Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.64 KB

File metadata and controls

59 lines (39 loc) · 2.64 KB

Accessibility Notes

This document records accessibility principles for Queener's web app, especially board keyboard interaction.

Keyboard Layers

Queener keeps page navigation and game controls as separate keyboard layers.

Page Navigation

Use the browser's normal focus model for moving between page controls.

  • Tab moves forward through page-level controls such as restart, home, board cells, hint, settings fields, and modal actions.
  • Shift + Tab moves backward through the same focus order.
  • Native buttons, form fields, dialogs, and modal controls should keep their expected keyboard behavior.
  • Modals own focus while open. Game shortcuts should not run while a modal or key-capture control is active.

Do not replace page navigation with game-specific controls. Keyboard users and assistive technology users must always be able to enter and leave the board with ordinary focus movement.

Board Controls

Once focus is on the board, game controls may provide faster board-local actions.

  • Arrow keys move focus between board cells.
  • Space acts as the board press action for the focused cell.
  • Game shortcuts, such as queen hint, should be additive shortcuts rather than replacements for focusable buttons.
  • Found and wrong cells remain focusable so the board can still be inspected, but press actions on locked cells are ignored.

The board should follow a roving-grid style mental model: Tab enters and leaves the board area, while arrow keys move around inside the board.

Shortcut Settings

Shortcut settings should preserve accessibility defaults.

  • Keep Tab, Shift + Tab, Escape, Enter, Space, and arrow keys reserved for browser, modal, form, and board navigation behavior.
  • Prefer configurable shortcuts only for additive game actions, such as using the queen hint.
  • Shortcut capture UI should allow Escape to cancel capture.
  • Shortcut capture UI should reject reserved keys instead of stealing them.
  • Shortcuts should be disabled while text inputs, modal dialogs, or shortcut-capture controls are active.

Implementation Boundary

The board input architecture should preserve this flow:

native input
  -> normalized cell or board intent
  -> board gesture interpretation
  -> QueenGame rule method
  -> BoardCell state

Accessibility-sensitive input mapping belongs near the input composables:

  • useGameCellInputEvents: cell-level pointer, click, focus, Space, and arrow-key mapping
  • useGameBoardInputEvents: board-level native listeners, focus movement, and touch coordinate handling
  • useGameBoardGestures: press, double press, and drag interpretation

For exact transition tables, see state.md.