From 51b6623f6ab3229fe77966ac0691f5697d119feb Mon Sep 17 00:00:00 2001 From: Navya Singh Date: Sat, 27 Jun 2026 23:32:36 -0700 Subject: [PATCH] fix: use semantic button elements for in-page actions (a11y MAS 4.1.2) Interactive controls that trigger in-page JavaScript actions (not navigation) were implemented as elements, which get implicit role='link'. Screen readers announced them as links, misleading users expecting button behavior. Fixes: - EditorExamples.tsx: 'Show Sample Code' -> ) diff --git a/packages/typescriptlang-org/src/components/index/EditorExamples.tsx b/packages/typescriptlang-org/src/components/index/EditorExamples.tsx index 48c23c96ab51..b45042fd63e2 100644 --- a/packages/typescriptlang-org/src/components/index/EditorExamples.tsx +++ b/packages/typescriptlang-org/src/components/index/EditorExamples.tsx @@ -70,9 +70,8 @@ export const EditorExamples = () => { - @@ -85,7 +84,7 @@ export const EditorExamples = () => { > - + ); }; diff --git a/packages/typescriptlang-org/src/templates/pages/css/index.scss b/packages/typescriptlang-org/src/templates/pages/css/index.scss index 929591f5e180..f051164d7880 100644 --- a/packages/typescriptlang-org/src/templates/pages/css/index.scss +++ b/packages/typescriptlang-org/src/templates/pages/css/index.scss @@ -50,6 +50,9 @@ $headline-foreground-bg: white; padding: 1rem 1rem; text-decoration: none; cursor: pointer; + border: none; + font-family: inherit; + font-size: inherit; @media screen and (-ms-high-contrast: active) { border: 2px solid grey; @@ -1281,6 +1284,9 @@ $headline-foreground-bg: white; width: 80px; padding: 10px; cursor: pointer; + background: none; + font-family: inherit; + font-size: inherit; svg { margin-right: 8px; }