Prove a run can be chosen, set up, played and finished by keyboard alone - #23
Merged
Merged
Conversation
Phase 3's second question was whether the game is playable without a pointer, and nothing was checking it. tests/keyboard.browser.mjs does the whole run with the keyboard: tabs to the mode selector, changes it with the arrow keys, replaces the sample passage (select all, then type), tabs to APPLY PASSAGE and presses Enter, types the run to completion, and keeps tabbing until focus lands inside the result card. It also measures focus. Each control it stops on is compared against its own unfocused paint, so a stop has to change somehow: an outline, a border, a shadow or a background. That check is how the run found the two text fields that suppress the outline (.web-game-custom textarea and .connect-card input). Both do show focus, by moving their border to the accent colour, so the design stands and the test compares paint rather than demanding a ring. Also worth knowing for anyone writing a keyboard test here: the custom passage field starts holding the sample passage, so typing appends to it and the run can never finish. Select all first. In CI, after the accessibility suite.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
typearchy | 41d6967 | Commit Preview URL Branch Preview URL |
Sep 20 2026, 08:42 AM |
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.
Phase 3's second question was whether the game is playable without a pointer. Nothing was checking it, so this is the check.
tests/keyboard.browser.mjsdoes a whole run with the keyboard only: tabs to the mode selector, changes it with the arrow keys, replaces the sample passage (select all, then type), tabs to APPLY PASSAGE and presses Enter, types the run to completion, then keeps tabbing until focus lands inside the result card. It runs against the local worker and is in CI after the accessibility suite.It also measures focus rather than assuming it. Every control it stops on is compared against its own unfocused paint, so a stop has to change in some way: outline, border, shadow or background. That check is what surfaced the two text fields that suppress the outline (
.web-game-custom textareaand.connect-card input). Both do indicate focus, by moving their border to the accent colour, so the design stands and the test compares paint instead of demanding a ring. Recording it here because it is a design decision worth a second look: a 1px border change is a thinner indicator than the 2px ring every button and select gets.One trap for whoever writes the next keyboard test: the custom passage field starts holding the sample passage, so typing appends to it and the run can never complete. Select all first. That cost three runs to find.
No product code changes in this PR.