feat(a11y): automated WCAG AA accessibility testing in CI#623
Merged
Conversation
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 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! 🚀 |
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.
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 touchesfrontend/, and CI fails when any violation is introduced.Changes
frontend/e2e/a11y.spec.ts(new)Four Playwright tests that run axe-core against:
GET /with proposal cards renderedtheme=darkinlocalStorageRules:
wcag2a,wcag2aa,wcag21a,wcag21aaOn 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.jsonto the Playwright HTML report artifact so every violation is inspectable without re-running locally.The Freighter wallet mock reuses the exact same
addInitScriptpattern asproposals.spec.ts.frontend/package.json(modified)Added missing devDependencies that were previously only available via
npx:@axe-core/playwright—4.10.1(pinned)@playwright/test—1.44.1(pinned)Added scripts:
test:e2e— run all Playwright teststest:a11y— run only the accessibility specfrontend/playwright.config.ts(modified)Switched to
[list, html]reporter in CI so axe JSON attachments are included in the Playwright HTML report artifact. Existingprojects,webServer, andretriesconfiguration is unchanged..github/workflows/frontend-ci.yml(modified)Added a new
accessibilityjob that runs in parallel with the existingbuildjob:npm run test:a11y— blocking: CI fails on any WCAG violationplaywright-reportas artifacta11y-report-<run_id>(14-day retention) on every run, including failuresThe existing
buildjob 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— untouchedcontracts/— untouchedbackend/— untouchedfrontend-ci.yml— untouchedRunning locally