fix(website): give docs sidebar navigation a proper landmark box - #11414
Open
timotheeguerin wants to merge 2 commits into
Open
fix(website): give docs sidebar navigation a proper landmark box#11414timotheeguerin wants to merge 2 commits into
timotheeguerin wants to merge 2 commits into
Conversation
The docs sidebar is wrapped in Starlight's `<nav class="sidebar" aria-label="Documentation">`, but its inner `.sidebar-pane` is `position: fixed`, leaving the `<nav>` landmark element with a collapsed, empty layout box on desktop. Landmark tools then report the visible left navigation as not belonging to any landmark region. Move the fixed positioning onto the `<nav>` landmark itself so its bounding box coincides with the visible sidebar. Fixes microsoft#10793
Contributor
|
No changes needing a change description found. |
|
You can try these changes here
|
timotheeguerin
marked this pull request as ready for review
July 27, 2026 17:25
timotheeguerin
requested review from
catalinaperalta,
iscai-msft,
markcowl and
xirzec
as code owners
July 27, 2026 17:25
xirzec
approved these changes
Jul 27, 2026
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 #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 (#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-paneisposition: 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.astroStarlight override, move the fixed positioning onto the<nav>landmark itself (desktop only,min-width: 50rem) and let.sidebar-panefill 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.sidebarbounding box is nowx:0, y:58, w:300, h:697— covering the full visible sidebar, with all sidebar links contained inside it.x:300); no visual regression.@typespec/websiteis a private package, so no changelog entry is required (consistent with #11292).