Skip to content

feat(playground): add accessibility and keyboard test coverage - #232

Merged
truthixify merged 1 commit into
wraith-protocol:developfrom
Moonwalker-rgb:feat/playground-a11y-tests
Nov 23, 2026
Merged

truthixify merged 1 commit into
wraith-protocol:developfrom
Moonwalker-rgb:feat/playground-a11y-tests

Conversation

@Moonwalker-rgb

Copy link
Copy Markdown
Contributor

Closes #220

What changed

  • Cryptographic inputs and the asset select now have explicit <label for> associations, and each field has an error slot wired through aria-describedby.
  • Validation now marks the invalid field with aria-invalid, moves focus to it, and preserves the user's input. Global failures focus and announce the result region.
  • Result status bars use role="status" / role="alert", and a shared polite live region announces copy actions and step resets.
  • Permalinks and the demo-key action are real buttons, so they work from the keyboard and have a 24px minimum target.
  • The stepper exposes aria-current="step" and aria-controls, and activating a step moves focus to its panel heading. Panels are labelled regions.
  • Scrollable code blocks and the announcement table are keyboard focusable, and the table now has a caption and column headers.
  • Reduced-motion users get no scanning pulse or transitions. Below 480px the steps reflow to two columns and the input rows wrap, so the flow works at 320px and at 200% zoom.
  • Contrast was raised for muted text, solid buttons, and the privacy link inside tinted match cards.

Tests

New scripts/playground/tests/a11y.spec.ts adds 10 Playwright tests:

  • axe scan (WCAG 2.0/2.1/2.2 A + AA) on all four steps with results rendered, plus a mobile-width scan.
  • Accessible names for every input and select, and error/input associations.
  • Tab order for the stepper and derive panel.
  • Focus movement and aria-current on step changes.
  • Error focus, aria-invalid, live announcement, and input preservation for derive and scan errors.
  • Live-region copy confirmations and scan status.
  • Reduced-motion behaviour.
  • Full keyboard-only flow at 640x512 (200% zoom) and 360x740 (mobile), with a horizontal-overflow assertion.

No axe rules are excluded: the markup and palette were fixed instead. Any future exception should be documented here before it is added.

Verification

  • pnpm run test:playground — 12 passed (10 new + 2 existing smoke tests)
  • npx tsc -p tsconfig.json
  • pnpm install --frozen-lockfile --ignore-scripts validates the new @axe-core/playwright dev dependency

Label the cryptographic inputs, associate field errors with aria-invalid
and aria-describedby, and announce results and copy actions through live
regions. Move focus to the active panel heading on step changes, add
reduced-motion and narrow-width reflow styles, and make the permalink and
demo-key actions keyboard operable.

Add axe and keyboard-only Playwright tests covering all four steps at
200% zoom and mobile width, with no serious or critical violations.
@drips-wave

drips-wave Bot commented Nov 22, 2026

Copy link
Copy Markdown

@Moonwalker-rgb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify
truthixify merged commit 2da4ccf into wraith-protocol:develop Nov 23, 2026
9 of 10 checks passed
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.

[Wave 11] Add accessibility and keyboard tests for the interactive playground

2 participants