Skip to content

feat(a11y): expand accessibility test suite with axe, keyboard nav, a…#261

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
darcszn:feat/accessibility-a11y-tests
Jul 22, 2026
Merged

feat(a11y): expand accessibility test suite with axe, keyboard nav, a…#261
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
darcszn:feat/accessibility-a11y-tests

Conversation

@darcszn

@darcszn darcszn commented Jul 22, 2026

Copy link
Copy Markdown

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

…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
@Austinaminu2
Austinaminu2 merged commit 61f2532 into FlowwStar:main Jul 22, 2026
1 of 6 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.

testing: accessibility.spec.ts has no automated a11y scan or focus/keyboard-nav tests

2 participants