Skip to content

fix(a11y): isolate board from VoiceOver behind pause + completion overlays - #691

Merged
wei18 merged 1 commit into
mainfrom
fix/680-overlay-a11y-isolation
Jul 5, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/680-overlay-a11y-isolation

Conversation

@wei18

@wei18 wei18 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Fixes #680: the pause and completion overlays (hand-mounted .overlay layers, not system presentations) left the underlying board's dozens of cell buttons live in the accessibility tree, interleaved with the overlay's own controls.

Fix: .accessibilityAddTraits(.isModal) once on each shared component's root (PauseOverlayView, CompletionOverlayScaffold) — SwiftUI's semantic for 'treat as modal, ignore siblings'. ONE 17-line change covers both apps and both overlay states; zero per-app edits (mirror principle).

Evidence (sim idb ui describe-all): BEFORE — pause tree contained Row 9, Column 9 cells + Digit 1..9 alongside Leave Game?/Resume/Leave; completion had Play Again/Close sandwiched among board cells. AFTER — both trees collapse to exactly the overlay's own elements. Verified on Sudoku (pause + completion, before/after) and Minesweeper (pause; completion structurally identical — same shared component). Standalone pushed re-view routes confirmed no-op (no board sibling).

Tests: GameShellKit 21 · SudokuKit 261 · MinesweeperKit 173 · GameAppKit 26 — all green, zero snapshot diffs (a11y traits don't render). 17 LOC, no mandatory-CR surface — Leader-reviewed.

🤖 Generated with Claude Code

…ays (#680)

PauseOverlayView and CompletionOverlayScaffold (GameShellKit) left the
underlying board's cell/digit-pad buttons live in the accessibility tree
while presented, so VoiceOver users swiping the paused/completed screen
landed on dozens of stale board elements interleaved with the overlay's
1-2 real controls. Sim-verified (idb ui describe-all, both apps) that
`.accessibilityAddTraits(.isModal)` on each overlay's root ALONE fully
isolates the tree - no manual `.accessibilityHidden` plumbing needed at
the four board mount sites. One shared fix in GameShellKit covers both
overlay states on both apps.

Co-Authored-By: Claude Fable 5 <[email protected]>
@wei18
wei18 merged commit 777359d into main Jul 5, 2026
4 checks passed
@wei18
wei18 deleted the fix/680-overlay-a11y-isolation branch July 5, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(a11y): pause + completion overlays don't hide the board from the accessibility tree (both apps)

1 participant