Skip to content

Commit d1f2d58

Browse files
snapsynapseclaude
andcommitted
ci(a11y): launch Chrome with --no-sandbox for pa11y-ci
The a11y job never ran to completion: it `needs: build`, which was always failing, so it was skipped. With build fixed, a11y now runs and Chromium aborts on the runner — "No usable sandbox!" — because recent Ubuntu runner images disable unprivileged user namespaces. Add .pa11yci.json launching Chrome with --no-sandbox (safe in ephemeral CI) and pass it via --config to both pa11y-ci invocations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2f40d9a commit d1f2d58

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ jobs:
8282
if [ -f docs/sitemap.xml ]; then
8383
SITE_BASE=$(grep -oE '<loc>[^<]+</loc>' docs/sitemap.xml | head -1 | sed -E 's|<loc>(.+)/?</loc>|\1|' | sed -E 's|/$||')
8484
npx --yes pa11y-ci \
85+
--config .pa11yci.json \
8586
--sitemap http://localhost:8088/sitemap.xml \
8687
--sitemap-find "$SITE_BASE" \
8788
--sitemap-replace 'http://localhost:8088' \
8889
--threshold 0
8990
else
90-
npx --yes pa11y-ci http://localhost:8088/ --threshold 0
91+
npx --yes pa11y-ci --config .pa11yci.json http://localhost:8088/ --threshold 0
9192
fi
9293
9394
# GitHub Pages serves directly from `main` branch root on this repo.

‎.pa11yci.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"defaults": {
3+
"standard": "WCAG2AA",
4+
"chromeLaunchConfig": {
5+
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)