feat(ui): accessibility pass — WCAG 2.2 AA for login/lobby/shell (F2)
Add the a11y foundation and bring login, lobby, and the in-game shell to WCAG 2.2 AA: - Primitives: .sr-only + .skip-link (base.css), trapFocus (modal focus trap + restore) and restoreFocus (menu focus restore) actions, the --color-focus visible ring. - In-game shell: skip link + focusable main landmark; WAI-ARIA sidebar tabs (roving tabindex, arrow/Home/End, tabpanel wiring); menu Escape + focus restore (account / view / turn-navigator / map-toggles / bottom-tabs); mail compose as a role=dialog modal with a focus trap. - login / lobby / lobby-create: skip link + main landmark, field labels, role=alert / role=status live regions. - Map canvas: aria-label naming it a visual overview, with its data reachable by keyboard via the sidebar inspector and tables (accessible alternative; in-canvas keyboard nav deferred). Gates (chromium-desktop): tests/e2e/a11y-axe.spec.ts scans every top-level view for WCAG 2.2 AA violations (zero); a11y-keyboard.spec.ts covers the skip link, menu Escape+restore, and tab roving. Adds @axe-core/playwright. Docs: ui/docs/a11y.md (+ index). Marks F1 and F2 done in ui/PLAN-finalize.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+20
-2
@@ -19,7 +19,15 @@ being marked done.
|
||||
|
||||
---
|
||||
|
||||
## F1 — Visual design system
|
||||
## F1 — Visual design system — done
|
||||
|
||||
Merged to `development` via PR #26 (2026-05-22): a shared design-token
|
||||
system (`ui/frontend/src/lib/theme/`), light/dark theming with a picker
|
||||
and pre-paint guard, and the whole UI migrated onto the tokens.
|
||||
Documented literal exceptions: the battle-scene data-viz palette, overlay
|
||||
scrims, and directional/deliberate drop shadows. The default theme is
|
||||
dark; flipping it to `system` is an available follow-up. Tokens and
|
||||
conventions live in `ui/docs/design-system.md`.
|
||||
|
||||
Goal: replace the ad-hoc per-component styling (inline hex colors like
|
||||
`#0a0e1a`, one-off spacing) with a shared design language so every view
|
||||
@@ -36,7 +44,17 @@ Acceptance: no literal theme colors left in component `<style>` blocks
|
||||
(spot-checked); a single token change restyles the app coherently.
|
||||
Consider the `frontend-design` skill for the palette/spacing pass.
|
||||
|
||||
## F2 — Accessibility (WCAG 2.2 AA)
|
||||
## F2 — Accessibility (WCAG 2.2 AA) — done
|
||||
|
||||
Shared a11y primitives (`.sr-only`, `.skip-link`, `trapFocus`,
|
||||
`restoreFocus`, the `--color-focus` ring), keyboard paths and ARIA across
|
||||
login / lobby / in-game shell (skip links + landmarks, WAI-ARIA sidebar
|
||||
tabs with roving + arrow keys, menu Escape + focus restore, the mail
|
||||
compose modal dialog with a focus trap), and the map canvas handled as a
|
||||
labelled accessible-alternative surface (data via the sidebar/tables).
|
||||
Gated by `tests/e2e/a11y-axe.spec.ts` (axe WCAG 2.2 AA scan of every
|
||||
top-level view, chromium-desktop, zero violations) and
|
||||
`tests/e2e/a11y-keyboard.spec.ts`. Documented in `ui/docs/a11y.md`.
|
||||
|
||||
(From Phase 35.) Goal: the whole client is usable by keyboard and
|
||||
assistive tech.
|
||||
|
||||
Reference in New Issue
Block a user