Skip to content

Make the checkbox widget accessible to keyboard and screen-reader users - #92

Merged
cport1 merged 1 commit into
mainfrom
fix/widget-a11y
Nov 14, 2026
Merged

cport1 merged 1 commit into
mainfrom
fix/widget-a11y

Conversation

@cport1

@cport1 cport1 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

The "I'm not a robot" checkbox widget is the interactive step an application can show when clearance needs a person. It could be operated from the keyboard, but a screen reader got little from it:

  • The checkbox had no accessible name. It was announced as an unlabeled checkbox.
  • "Verifying", "Verified" and failure messages were silent.
  • A failure message cleared itself after three seconds.

Changes:

  • aria-label on the checkbox; the duplicate visible text is hidden from the accessibility tree.
  • A polite role="status" region announces verifying, verified and failure (with how to retry).
  • aria-busy/aria-disabled while verifying.
  • A :focus-visible ring.
  • A failure message stays until the next attempt; only the red mark clears on the timer.

src/widget.test.ts covers the name, Space/Enter activation, announcements, the persistent failure message and reset. All six tests fail against the previous widget.

…en-reader users

Give the checkbox an accessible name, announce verifying/verified/failure
through a polite status region, mark it busy while verifying, add a visible
focus ring, and keep a failure message on screen until the next attempt
instead of clearing it after three seconds.
@cport1
cport1 merged commit c8cd59c into main Nov 14, 2026
2 checks passed
@cport1
cport1 deleted the fix/widget-a11y branch November 14, 2026 15:19
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