Repository navigation
Replace pa11y-ci with axe-core audit reusing Playwright - #242
Conversation
Closes #241 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
b0eb6f3 to
885f642
Compare
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
🔦 Lighthouse Report
|
Accessibility audit — axe-core / WCAG 2.2 AAPages scanned: 36.
Incomplete results require manual review; zero violations is not WCAG certification. |
This comment was marked as outdated.
This comment was marked as outdated.
vitepress preview Brotli-compresses the 4 MB Mermaid chunk on every request (~5 s per page). Request identity encoding in the audit context and scale workers with available CPUs (up to four). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This comment was marked as outdated.
This comment was marked as outdated.
Keep the Vue runtime and Vite helpers in the framework chunk so pages without diagrams no longer download the 4 MB Mermaid chunk, import the Mermaid renderer only when a diagram is present, reuse one browser context per audit worker, and run the fixture harness in a parallel job. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
⚡ Second optimisation pass: audit job 108 s → 45 s (×2.4)
Local audit: 14 s → 8 s. Root causes found and fixed
¹ The build stays dominated by single-threaded Rollup bundling of Mermaid. Minification and Verified locally:
Aikido MCP is not installed in my environment, so I could not run the scan. |
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reject redirected sitemaps, skip the sticky comment on Dependabot runs, wait for the destination heading in the Mermaid navigation test, and remove the reference page: the audit covers the docs site, not the CLI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Coverage after merging shouze-lightweight-a11y into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

What does this PR do?
Closes #241.
Replaces
pa11y-ci(Pa11y + Puppeteer + HTML_CodeSniffer) with the official@axe-core/playwrightadapter, which reuses the@playwright/testdependency we already have and the runner's system Chrome. No extra browser download.scripts/a11y.ts: audits every sitemap URL with one shared browser and 2 workers. Uses explicit WCAG 2.0/2.1/2.2 A/AA tags, with no fixed 1.5 s wait and no blanket ignores. Violations, HTTP errors, redirects, timeouts and empty or invalid sitemaps all exit with a nonzero status.scripts/a11y-utils.ts(+ unit tests) andscripts/a11y.pw.ts: these harness regression tests cover pass, a deliberate violation (image-alt), an empty sitemap, malformed XML, a missing<loc>, an out-of-base URL, an HTTP 404 and a sitemap 500. Reports are kept on failure.role="group".Measurements (same macOS machine, same built site, system Chrome)
node_modules(bun install --ignore-scripts)bun.lockpackage entriesThese are local measurements only; hosted CI timings will appear on this PR's run. The other lockfile
+lines are only Lighthouse's existing Puppeteer deps being re-hoisted, with the same versions. Note that axe and HTML_CodeSniffer have different rule sets, and a clean automated audit does not mean WCAG certification.How did you verify your code works?
bun test: 1039 pass, 0 failbun run lint: 0 errors (no new warnings)bun run format:check: passbun run knip: cleanbun run docs:build:a11y: successbun run docs:a11y: 37/37 pages, 0 violationsbun run docs:test:a11y: 10/10 passpa11y-ci --config .pa11yci.json --sitemap …on main: 37/37 pass, 293.5 s