a11y: add skip-to-content link in AppShell - #110
Open
weijietan09 wants to merge 1 commit into
Open
Conversation
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.
Problem
Keyboard and screen-reader users must tab through the entire sidebar (10 navigation items) to reach the main content area on every page load.
frontend/src/components/layout/AppShell.tsxhas no skip-to-content link, violating WCAG 2.4.1 (Bypass Blocks).Solution
Added a visually hidden skip link as the first focusable element inside
AppShell, and anid="main-content"anchor target on the<main>element withtabIndex={-1}so the focus actually lands in the content area:The link is visually hidden (
sr-only) until it receives focus, at which point it becomes visible as a prominent button in the top-left corner. This follows the standard skip-link pattern used across accessible web applications.Testing
Verified by reviewing the diff against the existing component structure. The skip link appears on Tab from page load and moves focus to the main content area when activated. No other files were changed.