Repository navigation
fix(a11y): isolate board from VoiceOver behind pause + completion overlays - #691
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #680: the pause and completion overlays (hand-mounted
.overlaylayers, 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 containedRow 9, Column 9cells +Digit 1..9alongsideLeave Game?/Resume/Leave; completion hadPlay Again/Closesandwiched 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