Skip to content

Prove a run can be chosen, set up, played and finished by keyboard alone - #23

Merged
btsouth merged 1 commit into
mainfrom
a11y/keyboard-play
Sep 20, 2026
Merged

btsouth merged 1 commit into
mainfrom
a11y/keyboard-play

Conversation

@btsouth

@btsouth btsouth commented Sep 20, 2026

Copy link
Copy Markdown
Owner

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.mjs does 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 textarea and .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.

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.
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: ea764739-327d-4abb-aecc-84106a9cd2d2


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@btsouth
btsouth merged commit 7aebdba into main Sep 20, 2026
3 checks passed
@btsouth
btsouth deleted the a11y/keyboard-play branch September 20, 2026 08:47
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.

1 participant