Skip to content

web(a11y): add skip link and single main landmark across pages - #564

Merged
karagozemin merged 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:web/issue-548-skip-link-main-landmark
Oct 27, 2026
Merged

karagozemin merged 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:web/issue-548-skip-link-main-landmark

Conversation

@umpireboulianne-design

Copy link
Copy Markdown
Contributor

Summary

  • Add a keyboard-focusable SkipLink component (apps/web/src/components/SkipLink.tsx) rendered as the first interactive element inside the App shell (apps/web/src/App.tsx) that moves keyboard focus and scroll position to #main-content without clobbering the hash router.
  • Style .skip-link in apps/web/src/styles/base.css so it remains hidden off-screen by default and becomes visibly prominent on :focus / :focus-visible.
  • Update LandingPage.tsx, DashboardPage.tsx, ArchitecturePage.tsx, and DemoPage.tsx so each page uses a <div> page wrapper, places primary navigation (<nav> / <aside className="case-nav">) first, and exposes a single unambiguous <main id="main-content" tabIndex={-1}> landmark for main content.
  • Add automated tests in apps/web/src/skip-link-landmarks.test.tsx (imported by RoundStatusCard.test.tsx so pnpm web:test executes them in CI without altering package.json scripts) and document the landmark convention in ARCHITECTURE.md.

Supply-chain review

  • No package scripts or dependencies changed. If changed, explain why below.
  • No .vscode/, workflow, or other editor/config file changes. If changed, list them below.
  • No lockfile changes. If changed, explain the update below.
  • No binary or font asset changes. If changed, list and justify them below.
  • I confirm no automatic task (such as preinstall/postinstall) was added.
  • I confirm no hidden executable payload (encoded blob, obfuscated command, or unexpected binary) was added.
  • Any changed executable or binary was reviewed by a maintainer.

Testing

  • node --import tsx --test src/skip-link-landmarks.test.tsx in apps/web (6/6 tests pass)
  • pnpm --filter @sub-rosa/web build (production Vite build succeeds)
  • node scripts/check-direct-time-access.mjs (passes)
  • node scripts/check-links.js (passes)

Closes #548
Fixes #548

@karagozemin
karagozemin merged commit 3cb2391 into Sub-Rosa-Issue:main Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web(high/easy): add a skip link and main landmark

2 participants