feat(viewer): accessibility pass — aria-current, copy-link SR feedback, named nav landmark (#544)#560
Merged
Conversation
…k, named nav landmark (#544) Three additive accessibility affordances in the viewer, all leaving the existing visual cues in place: - aria-current="page" on the active navigation link and aria-current="true" on the active "On this page" outline entry, so screen readers announce which page and heading you're on instead of relying on color alone. Inactive items omit the attribute entirely. - The comment "Copy link" button now announces success through a visually-hidden polite live region ("Link copied"), in addition to the existing icon swap. - The desktop navigation landmark gains an accessible name ("Documentation"), distinct from the breadcrumb, table-of-contents, and mobile-navigation landmarks (which are mutually exclusive with it in the a11y tree). Tests: component tests for the TOC attribute and the copy-link announcement (including its 1500ms auto-reset, via fake timers), plus Playwright e2e for the active-nav aria-current and the named landmark. Closes #544 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Resolves the three grouped low-severity accessibility items in #544. All changes are additive ARIA/markup — existing visual cues are unchanged, no new dependencies.
Changes
aria-currenton active nav & TOC items —aria-current="page"on the active navigation link (NavItem.svelte) andaria-current="true"on the active "On this page" outline entry (TocSidebar.svelte). Screen readers now announce which page and heading you're on instead of relying on color alone. Inactive items omit the attribute entirely.<nav>gainsaria-label="Documentation", distinct from the breadcrumb, table-of-contents, and mobile-navigation landmarks (which are mutually exclusive with it in the a11y tree, so no same-name collision).Tests
aria-current(active/inactive/none), and the copy-link announcement including its 1500ms auto-reset (deterministic via fake timers).aria-current="page"(with a leaf-sibling negative control) and the named "Documentation" landmark.Closes #544
🤖 Generated with Claude Code