Skip to content

feat(a11y): automated WCAG AA accessibility testing in CI#623

Merged
Vera3289 merged 2 commits into
Vera3289:mainfrom
Akeem813:feat/a11y-testing
Jun 27, 2026
Merged

feat(a11y): automated WCAG AA accessibility testing in CI#623
Vera3289 merged 2 commits into
Vera3289:mainfrom
Akeem813:feat/a11y-testing

Conversation

@Akeem813

@Akeem813 Akeem813 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #533


Summary

Integrates automated WCAG 2.1 AA accessibility scanning into the existing Playwright E2E suite and adds a blocking CI job to frontend-ci.yml. axe-core scans four page states on every push and PR that touches frontend/, and CI fails when any violation is introduced.


Changes

frontend/e2e/a11y.spec.ts (new)

Four Playwright tests that run axe-core against:

Test Page / state
Initial page load GET / with proposal cards rendered
After state filter After clicking the Passed filter button
After wallet connect After the wallet button is clicked and label updates
Dark mode Page loaded with theme=dark in localStorage

Rules: wcag2a, wcag2aa, wcag21a, wcag21aa

On failure, the test prints a readable summary of each violation including its impact level, axe rule ID, CSS selector, and HTML snippet. It also attaches axe-results.json to the Playwright HTML report artifact so every violation is inspectable without re-running locally.

The Freighter wallet mock reuses the exact same addInitScript pattern as proposals.spec.ts.

frontend/package.json (modified)

Added missing devDependencies that were previously only available via npx:

  • @axe-core/playwright4.10.1 (pinned)
  • @playwright/test1.44.1 (pinned)

Added scripts:

  • test:e2e — run all Playwright tests
  • test:a11y — run only the accessibility spec

frontend/playwright.config.ts (modified)

Switched to [list, html] reporter in CI so axe JSON attachments are included in the Playwright HTML report artifact. Existing projects, webServer, and retries configuration is unchanged.

.github/workflows/frontend-ci.yml (modified)

Added a new accessibility job that runs in parallel with the existing build job:

  • Installs dependencies and Playwright Chromium
  • Runs npm run test:a11yblocking: CI fails on any WCAG violation
  • Uploads the playwright-report as artifact a11y-report-<run_id> (14-day retention) on every run, including failures

The existing build job is completely unchanged.

docs/accessibility-testing.md (new)

Documents: local run commands, pages and states scanned, CI integration details, violation severity levels, step-by-step failure diagnosis, and known limitations (Freighter mock, dynamic content not yet scanned, Chromium-only scope).


What was NOT changed

  • frontend/e2e/proposals.spec.ts — untouched
  • contracts/ — untouched
  • backend/ — untouched
  • All existing CI workflows except frontend-ci.yml — untouched

Running locally

cd frontend
npm install
npm run test:a11y
npx playwright show-report   # view violations in the HTML report

Integrates axe-core accessibility scanning into the existing Playwright
E2E setup and adds a blocking CI job to frontend-ci.yml.

### New: frontend/e2e/a11y.spec.ts
Playwright tests that run axe-core (wcag2a, wcag2aa, wcag21a, wcag21aa)
against four page states: initial load, after state filter, after wallet
connect, and in dark mode. Fails on any violation. Attaches axe-results.json
to the Playwright HTML report for every run so violations are easy to locate.
Reuses the same Freighter wallet mock as proposals.spec.ts.

### Modified: frontend/package.json
- Add @axe-core/playwright 4.10.1 and @playwright/test 1.44.1 as pinned
  devDependencies (were missing from package.json, only used via npx).
- Add test:e2e and test:a11y scripts.

### Modified: frontend/playwright.config.ts
- Switch to [list, html] reporter in CI so axe JSON attachments appear
  in the Playwright HTML report artifact.
- Existing projects (chromium only) and webServer config unchanged.

### Modified: .github/workflows/frontend-ci.yml
- Add blocking accessibility job: installs deps, installs Playwright
  Chromium, runs npm run test:a11y, uploads playwright-report artifact
  (a11y-report-<run_id>, 14-day retention) on every run including failures.
- Existing build job unchanged.

### New: docs/accessibility-testing.md
Documents: local run commands, pages scanned, CI integration, violation
severity levels, failure diagnosis steps, and known limitations (Freighter
mock, dynamic content, single-browser scope).

No changes to contracts, backend, or existing E2E tests.
@Akeem813 Akeem813 requested a review from Vera3289 as a code owner June 27, 2026 13:04
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Akeem813 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

@Vera3289 Vera3289 merged commit 781d254 into Vera3289:main Jun 27, 2026
8 of 17 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: Add accessibility tests using axe or similar

2 participants