ci: Add pa11y in verify pipeline #79
No reviewers
Labels
No labels
dependencies
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Reference
Personal/martials.no!79
Loading…
Reference in a new issue
No description provided.
Delete branch "tests/pa11y"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add pa11y I'm ci and run config for testing accessibility and fix issues
Review Summary
Verdict: approve — no blocking issues; three non-blocking
stylecomments below.What's solid:
.pa11yci.jsonis in pa11y-ci 5's config lookup order (.pa11yci,.pa11yci.cjs,.pa11yci.js,.pa11yci.json), withchromeLaunchConfigcorrectly placed indefaults(a whole-run option that per-URL objects cannot override).WCAG2AAwith the default threshold 0 is a strict, sensible baseline.PUPPETEER_EXECUTABLE_PATHexported in the accessibility step is honored by puppeteer's configuration layer (pa11y depends on fullpuppeteer^25.9.0, not-core), so the system Chromium fromapk add chromiumis used.--no-sandboxis required for Chrome as root in the container — acceptable for CI. Note for local runs the needed variable isPUPPETEER_EXECUTABLE_PATH(a prior comment sayingPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHapplied to pa11y was incorrect — that variable is for the Playwright e2e suite).siteresolves tohttps://martials.noonastro buildbecause the build entry callsensureProcessNodeEnv('production')beforeastro.config.tsevaluates, soloadEnvpicks up.env.production; the customsitemap-index.xml.tsroute emits a urlset whose<loc>values are built withnew URL(path, site.href)— no double-slash paths.contact.astro: moving the submit button inside the<form>fixes a real functional bug — atype="submit"outside the form never submits. The honeypot restyle (display:none+aria-hidden+tabindex="-1") is harmless:display:noneinputs are still submitted, so Formspree's_gotchakeeps working.bun.lockchanges are confined to pa11y's dependency tree plus bun re-hoisting (rootcommander→ 14.0.3 withsvgo/commandernested;entities/undicire-hoisted with both versions retained — not a true downgrade), and thebun.nixbumps (astro 7.3.4, @astrojs/node 11.1.6, etc.) sync entries that were already stale versuspackage.json/bun.lockon main. Worth a line in the PR description, but not scope creep.Non-blocking: see the three comments — harden the sitemap origin rewrite, add
--disable-dev-shm-usagefor Chrome in Docker, and document the a11y step's reliance on workspace state from the verify step.*🤖 Review by opencode (opencode/mimo-v2.6-flash-free) — verdict: approve
Code review findings from opencode.
@ -0,0 +6,4 @@args: ["--no-sandbox"],},},urls: [Replaced by sitemap
@ -8,3 +8,3 @@image: docker.io/oven/bun:1.4.2-alpinecommands:- apk add --no-cache chromium- apk add --no-cache chromium nodejsIt is a runtime dependency
@ -15,0 +23,4 @@fisleep 1doneexit 1@ -10,6 +10,7 @@"astro": "bunx --bun astro","type-check": "bunx --bun astro check","test:e2e": "bunx playwright test","test:a11y": "pa11y-ci",Code review findings from opencode.
@ -0,0 +2,4 @@"defaults": {"standard": "WCAG2AA","chromeLaunchConfig": {"args": ["--no-sandbox", "--disable-dev-shm-usage"]@ -15,0 +21,4 @@- apk add --no-cache chromium nodejs- node -e 'const [major, minor] = process.versions.node.split(".").map(Number); if (!((major === 22 && minor >= 13) || major >= 24)) { console.error("Pa11y needs Node.js 22.13+ or 24+; found " + process.version); process.exit(1); }'- export PUPPETEER_EXECUTABLE_PATH="$(command -v chromium-browser || command -v chromium)"- |@ -10,6 +10,7 @@"astro": "bunx --bun astro","type-check": "bunx --bun astro check","test:e2e": "bunx playwright test","test:a11y": "pa11y-ci --sitemap http://127.0.0.1:4323/sitemap-index.xml --sitemap-find 'https?://[^/]*' --sitemap-replace http://127.0.0.1:4323",