Repository navigation
chore: replace Playwright/axe a11y tests with pa11y-ci-action - #548
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
🗺️ Overture Docs preview is live!
Note ♻️ This preview updates automatically with each push to this PR. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The pa11y configuration omits WCAG 2.2-specific axe rules that the previous test executed.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Replaces the custom Playwright accessibility suite with pa11y CI for issue #549.
Changes:
- Adds pa11y configuration for seven pages.
- Updates CI to serve and scan the built site.
- Removes Playwright/axe dependencies and tests.
| File | Description |
|---|---|
.pa11yci.json |
Defines accessibility scan settings and URLs. |
.github/workflows/ci.yml |
Runs pa11y against the built site. |
package.json |
Removes obsolete script and dependencies. |
package-lock.json |
Removes corresponding locked packages. |
__tests__/a11y.test.mjs |
Deletes the replaced test implementation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Alex Iannicelli (atiannicelli)
left a comment
There was a problem hiding this comment.
Seems like a positive.


Pull Request
Closes #549
Replaces the custom Playwright + axe-core accessibility test with lowlysre/pa11y-ci-action, pinned to the v1.0.0 commit SHA. The old test needed its own static file server, a browser install step, and two devDependencies. Now, all we need is a light config file! This hoists a lot of boilerplate that we don't need for this project.
The scan keeps the same 7 pages and uses the axe runner with the
WCAG2AAstandard. pa11y maps that standard to the WCAG 2.0 and 2.1 A/AA axe tags only, so the check is now scoped to WCAG 2.1 AA. The old test also ranwcag22aa, and pa11y has no way to enable it. The CI job is renamed to match.The CI job serves the built site with
docusaurus serveon port 3000 and waits for it before scanning.--no-sandboxis set in the config because Chromium's sandbox is blocked onubuntu-latest.Removes
__tests__/a11y.test.mjs, thetest:a11yscript, and theplaywright/@axe-core/playwrightdevDependencies.Testing
The accessibility job passed on the earlier CI run. The latest push only renames the job, and I didn't run the scan locally or confirm the job fails on a page with real violations.