Repository navigation
feat(app): skip link, focus-visible baseline and keyboard-navigable header - #46
Open
jdjioe5-cpu wants to merge 1 commit into
Open
jdjioe5-cpu wants to merge 1 commit into
jdjioe5-cpu wants to merge 1 commit into
Conversation
11 tasks
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.
What and why
Closes #39.
Implements the accessible navigation baseline under Roadmap
M3-17: provides a visually-hidden skip-to-content link as the first focusable element on every page to bypass testnet banner and header navigation, wraps content in a semantic landmark with focus target management (tabIndex={-1}), adds accessible focus restoration to the disclosure navigation onEscape, and establishes WCAG 2.2 compliant:focus-visibleoutline rings.Changes
components/a11y/SkipLink.tsx:#main-content, visually hidden via.sr-onlyand surfaced cleanly with high-contrast badge when keyboard-focused (focus:not-sr-only focus:fixed focus:top-3 focus:left-3 ...).t("common.skipToContent").app/layout.tsx:<SkipLink />as the very first element in<body>preceding the testnet banner and<SiteHeader />.{children}in semantic landmark<main id="main-content" tabIndex={-1} className="outline-none">, ensuring focus actually shifts to content upon skip activation.components/nav/SiteHeader.tsx:toggleRefto mobile menu button.Escapekey press, closes the disclosure menu and restores focus back to the toggle button (toggleRef.current?.focus()).focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accentacross desktop/mobile nav links and buttons.app/globals.css::focus-visibleoutline rule with2px solid var(--accent)andoutline-offset: 2px, clearing WCAG 2.2 focus appearance (5.14:1 light, 6.84:1 dark >= 3:1).messages/en.json:common.skipToContent: "Skip to main content".components/a11y/SkipLink.test.ts:app/layout.tsxbefore banner and header, semantic<main>landmark withtabIndex={-1}, focus restoration on Escape inSiteHeader, and globals.css focus-visible rules.ROADMAP.md:M3-17remainsIN PROGRESS.Hard rules / invariants touched
Keyboard Navigation Verification
#main-content./send,/request,/verify) -> Documentation -> GitHub -> Mobile menu toggle.Tests
All verification commands executed locally and passed with zero errors and zero warnings:
Docs / ADR
Updated
ROADMAP.mdChangelog.Roadmap
M3-17(status unchanged,IN PROGRESS). Changelog entry added: yes.Assumptions and open questions
None. No external dependencies added.