Browser co-op kitchen game: FastAPI + native WebSockets, server-authoritative 20 Hz simulation, in-memory anonymous lobbies, data-driven YAML levels, Canvas 2D vanilla ES-module client with locally authored SVG art and no external CDNs. .agents/PLAN.md records the LOCKED decisions; .agents/user_stories/ holds the 12 flow contracts; .agents/phases/todo/ breaks them into 14 sequential, test-gated phases (71 task files), each leaving the app launchable and the suite green. LLM-Generated: true
1.7 KiB
1.7 KiB
US-12 — Play accessibly
As a player with low vision, motor limitations, or motion sensitivity, I want readable contrast, keyboard-only lobby use, and motion controls, so that I can play and follow the game state.
Acceptance criteria
- All non-canvas UI (lobby, level list, result, HUD text) is real HTML with a logical focus order, visible focus rings, and ≥ 4.5:1 text contrast (3:1 for large text).
- The entire lobby → level-select → start → result loop is operable with the keyboard only (no pointer required), with sensible default buttons.
- Round start, score changes worth ≥ 10 points, order missed, and the round result are
announced through a polite
aria-liveregion; per-frame data is never announced. prefers-reduced-motion: reduceremoves screen shake, flicker, and parallax, keeping static hazard markers; the setting is also togglable in-game and persisted locally.- No information is conveyed by color alone: cooks, orders, and hazards have shape, label, or icon differences; a colorblind-safe palette option is provided.
- Canvas has a text alternative:
role="img"+ anaria-labelsummarizing state, and a DOM "state panel" (toggleable) listing score, timer, orders, and hazards. - Text scales to 200% without loss of function; hit targets stay ≥ 44 px.
- Sound is optional, off by default, and never required to know the game state.
E2E suite
tests/e2e/test_us12_accessibility.py — keyboard-only loop, focus order, contrast audit
of computed styles, aria-live announcements for result, reduced-motion class applied.
Phases
07_canvas_client_and_hud, 11_campaign_levels_and_progression,
14_accessibility_polish_and_hardening