Wire Pa11y accessibility sweep into CI (report-only) (#1278 item 6)#1340
Merged
Conversation
CONTRIBUTING requires Pa11y on UI changes but nothing enforced it. Add a report-only a11y job to test.yml (matches the test/e2e 'signal, not gate' philosophy): builds a fresh schema from models, seeds deterministic demo content, serves it with a native runserver, and runs pa11y-ci, posting results to the run Summary. - .pa11yci.ci.json: CI variant of .pa11yci.json. The local config targets the compose host with the maintainer's real DB snapshot; CI has no snapshot, so this scans localhost URLs backed by seeded demo content. - seed_demo_news: small idempotent command so /news/ and a news detail render with content (pairs with the existing seed_demo_projects). Report-only for now (|| true) so pre-existing violations don't sit red next to every master deploy; can tighten to blocking once findings are triaged. Validated locally: all 9 scanned URLs return 200 with the seeded slugs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 18, 2026
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.
What & why
Implements item 6 of the testing roadmap (#1278): CONTRIBUTING requires a Pa11y a11y check on UI changes, but nothing enforced it. This adds a Pa11y + Axe (WCAG 2.0 AA) job to CI.
Report-only — like the existing
testande2ejobs ("signal, not gate"). It surfaces violations in the run Summary but never fails the build, so a pre-existing violation doesn't sit red next to everymasterdeploy. Easy to tighten to blocking later once the current findings are triaged.How it works
The local
.pa11yci.jsontargets the docker-compose host (website:8000) with the maintainer's real DB snapshot (jonfroehlich,sidewalk, …). CI has no snapshot, so the new job:migrate --run-syncdbundersettings_test, since migrations are gitignored).seed_demo_projects+ a new tinyseed_demo_news.runserver(mirrors thee2ejob's native-Python approach).pa11y-ciagainst.pa11yci.ci.json(localhost URLs backed by the seeded slugs) and posts results to the run Summary.Files
.github/workflows/test.yml— newa11yjob (Postgres service + ImageMagick/Ghostscript, same as the others)..pa11yci.ci.json— CI variant pointing atlocalhost:8000; the local-dev config is untouched.website/management/commands/seed_demo_news.py— small, idempotent, deterministic-slug news seed so/news/and a news detail render. Dev/CI tool; not wired intodocker-entrypoint.sh.Validation
Ran both seed commands and confirmed all 9 scanned URLs return 200 with the predicted slugs (
/project/demo-active-tall/,/member/demolovelace/,/news/demo-news-one/, plus the listing pages), then cleaned the demo data back out of the dev DB. Workflow YAML validated.Scope
No app behavior or schema change, so no version bump. Item 5 (the test backfill) is the separate PR #1339.
🤖 Generated with Claude Code