Add CI workflow with Pa11y accessibility checks on PRs#100
Open
alexwolson wants to merge 7 commits intomainfrom
Open
Add CI workflow with Pa11y accessibility checks on PRs#100alexwolson wants to merge 7 commits intomainfrom
alexwolson wants to merge 7 commits intomainfrom
Conversation
GitHub's ubuntu-latest now runs 24.04, which restricts unprivileged user namespaces via AppArmor. Pa11y/Puppeteer's Chromium fails to launch without --no-sandbox on this version.
--chromium-flags is not a valid pa11y CLI option. The correct fix, per pa11y's own TROUBLESHOOTING.md, is to disable Ubuntu 24.04's AppArmor user namespace restriction at the runner level before launching pa11y. This is the approach recommended for CI environments.
- Switch pa11y runs to --reporter json, saving per-page output to /tmp/ - Add Node.js step to aggregate JSON into a markdown report and write to GITHUB_STEP_SUMMARY - Add actions/github-script@v8 step to post or update a PR comment (identified by <!-- pa11y-report --> marker) - Move exit logic to a dedicated final step using GITHUB_OUTPUT - Add 2>/dev/null to sort pipe to suppress broken-pipe noise - Add pull-requests: write permission to accessibility job
Contributor
Pa11y Accessibility Report❌ 2 error(s), 0 warning(s) found (WCAG2AA) Homepage
2 error(s)
Event✅ No issues found. Project✅ No issues found. Person✅ No issues found. Organization✅ No issues found. Venue✅ No issues found. Resource✅ No issues found. Tag✅ No issues found. Category✅ No issues found. |
The --reporter json CLI output is a JSON array of issue objects, not
{pageUrl, issues:[]}. The report aggregator was doing data.issues which
always returned undefined, so issues was always [], making every page
appear clean.
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.
Summary
Adds a
ci.ymlGitHub Actions workflow that builds the Jekyll site on every PR and runs Pa11y WCAG2AA accessibility checks against a representative set of rendered pages.Closes #99
Design decisions
buildjob produces_site/artifact;accessibilityjob downloads it and runs Pa11y. Avoids duplicating the expensive Jekyll build. Additional check jobs (broken links, etc.) can be added later using the same artifact.Changes
.github/workflows/ci.yml— new workflowdocs/plans/2026-03-03-pa11y-accessibility-ci.md— implementation plan