feat(ui): accessibility pass — WCAG 2.2 AA (F2) #27
Reference in New Issue
Block a user
Delete Branch "feature/ui-finalize-f2-a11y"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F2 — Accessibility (WCAG 2.2 AA)
Brings login, lobby, and the in-game shell to WCAG 2.2 AA, with an
automated axe gate over every top-level view. From
ui/PLAN-finalize.mdF2.What changed
ui/frontend/src/lib/a11y/+base.css):.sr-only,.skip-link, thetrapFocusaction (modal focus trap + restore), therestoreFocusaction (menu focus restore), and the--color-focusvisible focus ring.
mainlandmark; WAI-ARIAsidebar tabs (roving
tabindex, arrow/Home/End keys,tabpanelwiring); menu Escape + focus-restore on account / view / turn-navigator
/ map-toggles / mobile-more; mail compose as a
role="dialog"modalwith a focus trap and Escape.
main, field labels,role="alert"/role="status"live regions.aria-labelnaming it a visual overview; all its data(planets, ship groups, routes) is reachable by keyboard via the sidebar
inspector and the tables view (accessible alternative — in-canvas
keyboard navigation is deferred to
ROADMAP.md).Gates (new, chromium-desktop only)
tests/e2e/a11y-axe.spec.ts—@axe-core/playwrightscans login,lobby, lobby/create, and the in-game map / report / mail / battle /
science-designer / table for WCAG 2.2 AA violations. Zero violations.
tests/e2e/a11y-keyboard.spec.ts— skip link, menu Escape+restore,sidebar tab arrow roving.
Docs
ui/docs/a11y.md(+ index entry). Marks F1 and F2 done inui/PLAN-finalize.md.Verification
pnpm check0/0;pnpm test735 passing; the two a11y specs passlocally on chromium-desktop (12/12). Adds the
@axe-core/playwrightdev dependency.
🤖 Generated with Claude Code