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:
@@ -8,6 +8,7 @@ const en = {
|
||||
"common.language": "language",
|
||||
"common.loading": "loading…",
|
||||
"common.dismiss": "dismiss",
|
||||
"common.skip_to_content": "skip to main content",
|
||||
"common.browser_not_supported_title": "browser not supported",
|
||||
"common.browser_not_supported_body":
|
||||
"Galaxy requires Ed25519 in WebCrypto. See supported browsers.",
|
||||
@@ -117,6 +118,8 @@ const en = {
|
||||
"game.shell.history.current_badge": "current",
|
||||
"game.view.map": "map",
|
||||
"game.map.toggles.open": "open map visibility menu",
|
||||
"game.map.aria_label":
|
||||
"galaxy map ({count} planets) — a visual overview; planet, ship-group and route details are available in the sidebar inspector and the tables view",
|
||||
"game.map.toggles.close": "close map visibility menu",
|
||||
"game.map.toggles.section.objects": "Objects",
|
||||
"game.map.toggles.section.planets": "Planets",
|
||||
|
||||
@@ -9,6 +9,7 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"common.language": "язык",
|
||||
"common.loading": "загрузка…",
|
||||
"common.dismiss": "закрыть",
|
||||
"common.skip_to_content": "к основному содержимому",
|
||||
"common.browser_not_supported_title": "браузер не поддерживается",
|
||||
"common.browser_not_supported_body":
|
||||
"Galaxy требует поддержки Ed25519 в WebCrypto. См. список поддерживаемых браузеров.",
|
||||
@@ -118,6 +119,8 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"game.shell.history.current_badge": "текущий",
|
||||
"game.view.map": "карта",
|
||||
"game.map.toggles.open": "открыть меню видимости карты",
|
||||
"game.map.aria_label":
|
||||
"карта галактики ({count} планет) — визуальный обзор; детали планет, групп кораблей и маршрутов доступны в инспекторе сайдбара и в таблицах",
|
||||
"game.map.toggles.close": "закрыть меню видимости карты",
|
||||
"game.map.toggles.section.objects": "Объекты",
|
||||
"game.map.toggles.section.planets": "Планеты",
|
||||
|
||||
Reference in New Issue
Block a user