fix(website): resolve typespec.io accessibility issues - #11292
Merged
Conversation
Fixes six A11y_TypeSpec website bugs: - #10789 (WCAG 2.4.1): add a "Skip to main content" link and a focusable <main> landmark to the non-docs page layout. - #10791 (WCAG 2.1.1): make the OpenAPI page sample carousel keyboard operable by converting the tabs to buttons with the full ARIA tabs pattern. - #10793 (WCAG 1.3.1): give the docs sidebar a distinct landmark name ("Documentation") so it no longer collides with the header nav. - #10794 (WCAG 1.4.12): keep the header on a single row under increased text spacing; hide the version banner in the narrow desktop range and allow the nav to wrap as a fallback instead of overlapping. - #10795 / #10796 (WCAG 1.4.10 / 1.4.4): stop the site header menu button from overlapping Starlight's sidebar menu button (and the search button) on docs pages by hiding the redundant control and reserving space; the site links remain reachable from the Starlight mobile menu.
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
timotheeguerin
marked this pull request as ready for review
July 17, 2026 14:09
timotheeguerin
requested review from
bterlson,
catalinaperalta,
iscai-msft,
markcowl and
witemple-msft
as code owners
July 17, 2026 14:09
This was referenced Jul 27, 2026
timotheeguerin
added a commit
to timotheeguerin/typespec
that referenced
this pull request
Jul 28, 2026
The playground container hard-coded its height as `calc(100vh - var(--header-height))`. Since microsoft#11292 made the header `position: sticky` (in flow) with a `min-height` navbar, the real rendered header is 54px while `--header-height` is 50px, so the page overflowed by ~4px and showed a vertical scrollbar. Make `.main` a flex column in the base layout and let the playground fill the remaining space via `flex: 1`, so it tracks the actual header height. Layout-neutral for other pages.
ArcturusZhang
pushed a commit
to ArcturusZhang/typespec
that referenced
this pull request
Jul 29, 2026
…rosoft#11414) Fixes microsoft#10793 ## Problem On the Docs pages, screen-reader / landmark tools report the left docs navigation as **not belonging to any landmark region** (WCAG 1.3.1). This was not resolved by the previous accessibility pass (microsoft#11292), which added the `aria-label="Documentation"` label but not the structural fix. Root cause: Starlight wraps the docs sidebar in `<nav class="sidebar" aria-label="Documentation">`, but its inner `.sidebar-pane` is `position: fixed`. On desktop that leaves the `<nav>` **landmark element itself with an empty, collapsed layout box**, so Accessibility Insights draws the "Documentation navigation" landmark up near the header and the visible left sidebar appears outside any landmark.  ## Fix In our existing `PageFrame.astro` Starlight override, move the fixed positioning onto the `<nav>` landmark itself (desktop only, `min-width: 50rem`) and let `.sidebar-pane` fill it. The navigation landmark's bounding box now coincides with the visible sidebar. ## Verification Measured with Playwright at 1365×755 (the reporter's environment): - `nav.sidebar` bounding box is now `x:0, y:58, w:300, h:697` — covering the full visible sidebar, with all sidebar links contained inside it. - Sidebar stays fixed while the main content scrolls, and scrolls independently when its content overflows. - Main content offset unchanged (`x:300`); no visual regression. - Mobile menu toggle behavior unchanged (the change is scoped to desktop widths). `@typespec/website` is a private package, so no changelog entry is required (consistent with microsoft#11292).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes six open A11y_TypeSpec website accessibility bugs (all Sev2,
meta:website) filed against typespec.io.<main id tabindex="-1">landmark to the non-docs page layout.role="tab"anchors (nohref) to<button>s with the full ARIA tabs pattern.--sl-nav-heightto the real header height so content offsets track the header.Verification
Each fix was verified in a locally running dev server with Playwright/Chromium:
<main>on activation.aria-selected.MainandDocumentationnav landmarks.astro check(0 errors / 0 warnings / 0 hints),oxlint, andprettierall pass.