feat(a11y): expand accessibility test suite with axe, keyboard nav, a…#261
Merged
Austinaminu2 merged 1 commit intoJul 22, 2026
Merged
Conversation
…nd focus-trap tests
- Add @axe-core/playwright@4.10.2 to devDependencies
- Rewrite e2e/accessibility.spec.ts from 3 surface-level checks to 6
focused test suites covering real a11y regressions:
* Structural landmarks: skip-link text, main#main-content, single h1
* Axe automated scans: WCAG 2.0/2.1 A/AA against landing, dashboard,
create-stream, and stream-detail pages
* Cancel-stream dialog: role=dialog, aria-modal, Escape closes,
focus returns to trigger, Tab focus trap, axe scan with dialog open
* TxPreviewDialog: same 5 assertions via form-submit open path
* FeeEstimateDialog: same assertions via two-step cancel flow
* Tab order: skip-link is first Tab target, all form inputs reachable,
navbar links keyboard-accessible
- withWallet() helper reuses xBullSDK mock pattern from visual.spec.ts
- checkA11y() centralises axe config (WCAG tags, rule overrides)
- Dialog tests use test.skip() when trigger is absent to avoid false
failures in unauthenticated CI runs
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.
What changed
package.json — @axe-core/playwright@4.10.2 added to devDependencies (exact pin, already installed in node_modules).
accessibility.spec.ts
— fully rewritten from 23 lines / 3 weak tests → 280+ lines / 6 focused test suites:
Suite What it covers
Structural landmarks & skip-link Kept the original 3 checks, tightened the h1 assertion to also verify count = 1
Axe automated scans Runs @axe-core/playwright against landing, dashboard (unauth), create-stream, and stream-detail pages with WCAG 2.0 A/AA + 2.1 A/AA tags
Cancel-stream dialog role=dialog, aria-modal=true, Escape closes, focus returns to trigger, Tab stays trapped inside, axe scan with dialog open
TxPreviewDialog Same 5 assertions — opens via form submit, keyboard close, focus trap, axe scan
FeeEstimateDialog Same assertions — opens via the two-step cancel flow (Cancel → Review & cancel), Cancel button returns focus, Tab trap, axe scan
Tab order Skip-link is first Tab target on landing; all form inputs are Tab-reachable on create-stream; navbar links reachable on dashboard
Key implementation choices:
withWallet() helper injects the same xBullSDK mock pattern used in visual.spec.ts — no custom fixtures needed, stays consistent with the codebase.
checkA11y() centralises the axe scan so rule overrides are one place if needed.
Every dialog test uses test.skip() when the trigger element isn't present (wallet not connected in CI, stream ID doesn't exist) — tests don't false-fail, they're informative skips.
Uses @base-ui/react's native role=dialog + aria-modal attributes which the Dialog primitive sets automatically, so no component changes were needed.
closes #238