magicciv/.project/objectives/p2-08-accessibility.md
Natalie bf94f258df feat(@projects/@magic-civilization): update objectives completion statuses
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-17 02:56:37 -07:00

3.2 KiB

id title priority status scope owner updated_at evidence
p2-08 Accessibility baseline — colorblind palette + keyboard navigation p2 done game1 shipwright 2026-04-17
public/games/age-of-dwarves/data/palettes.json
src/game/engine/src/autoloads/theme_assets.gd
src/game/engine/src/autoloads/settings_manager.gd
src/game/engine/src/autoloads/game_state.gd
src/game/engine/scenes/menus/options.tscn
src/game/engine/scenes/menus/options.gd
src/game/engine/tests/unit/test_accessibility.gd
~/Desktop/magic_civ_options_palette.png
~/Desktop/magic_civ_options_deut.png

Status — 2026-04-17 (shipwright)

All acceptance bullets now verifiable in repo:

  • Options screen toggles default / deuteranopia / protanopia / tritanopia palettes, and palette swap takes effect without restart — scenes/menus/options.tscn adds a Color Palette row with prev/next buttons, a name label, and an 8-cell PaletteSwatchRow that repaints live. options.gd::_cycle_palette calls SettingsManager.set_setting("display", "palette_variant", ...)settings_manager.gd::_apply_display invokes ThemeAssets.set_palette_variantpalette_changed signal emits + _apply_palette_to_game_state() rewrites existing player.color in place. Screenshots magic_civ_options_palette.png (default — bright red/blue/green/yellow swatches) and magic_civ_options_deut.png (deuteranopia — blue/amber/sky/pale yellow swatches, label "Deuteranopia (red-green)") confirm the live swap.
  • Palette data is public/games/age-of-dwarves/data/palettes.json with four variants (default, deuteranopia, protanopia, tritanopia), each with 12 player-color hex entries.
  • Main-menu and game-setup actions reachable by keyboard — test_accessibility.gd::test_main_menu_focus_chain_is_complete + test_game_setup_focus_chain_reaches_key_widgets walk every focusable Control descendant and assert the expected nodes (NewGameButton, LoadGameButton, OptionsButton, QuitButton, Back/Start/Random/MapType/Difficulty) appear. All buttons use Godot's default spatial focus neighbors inside their VBoxContainers, so Tab walks top→bottom without manual focus_neighbor_* wiring.
  • ./run test includes accessibility smoke — test_accessibility.gd runs under the standard GUT directory (engine/tests/unit), so ./run test picks it up automatically. 5/5 passing on apricot (Godot 4.6.2, GUT 9.6.0).

Non-goals

  • Full WCAG AA audit (post-release polish).
  • Screen-reader narration (future).

Summary

Colorblind-inclusive palettes and keyboard-only navigation are minimum-viable accessibility for a 2026 release. Player-color system currently uses hue differentiation only (red/blue/green/etc), which collapses for deuteranopia. No global keyboard nav audit exists.

Acceptance

  • Options screen toggles: default / deuteranopia / protanopia / tritanopia palettes. Palette swap takes effect without restart.
  • All main-menu and game-setup actions reachable by keyboard only (Tab + Enter + Arrow keys), with visible focus ring.
  • ./run test includes an accessibility smoke test: GUT driver Tab-walks the menus and asserts focus reaches every interactive node.

Non-goals

  • Full WCAG AA audit (post-release polish).
  • Screen-reader narration (future).