From 9983a86ae6a2edeff607e9887cc17cbf8679b808 Mon Sep 17 00:00:00 2001 From: Jon Froehlich Date: Thu, 18 Jun 2026 13:20:04 -0700 Subject: [PATCH] ci(#1278): exclude django-debug-toolbar from the Pa11y a11y scan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The a11y job runs with DEBUG=True (so runserver serves media/static), which injects django-debug-toolbar into every page. Its markup accounted for ~76% of the reported violations (126 unlabeled panel checkboxes + 42 contrast findings) — dev-only noise absent from production. Hide #djDebug (same mechanism already used for #js-toc) so the baseline reflects the real site. Co-Authored-By: Claude Opus 4.8 (1M context) --- .pa11yci.ci.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pa11yci.ci.json b/.pa11yci.ci.json index 85483114..4c5cc948 100644 --- a/.pa11yci.ci.json +++ b/.pa11yci.ci.json @@ -6,10 +6,10 @@ "chromeLaunchConfig": { "args": ["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage"] }, - "hideElements": "#js-toc", + "hideElements": "#js-toc, #djDebug", "ignore": [] }, - "_comment": "CI variant of .pa11yci.json (#1278 item 6). The local-dev config targets the docker-compose 'website:8000' host with the maintainer's real DB snapshot (jonfroehlich, sidewalk, ...). CI has no snapshot, so this config targets a native runserver on localhost:8000 seeded with deterministic demo content via `manage.py seed_demo_projects` + `seed_demo_news`. Keep the two URL lists in sync with what those seed commands create.", + "_comment": "CI variant of .pa11yci.json (#1278 item 6). The local-dev config targets the docker-compose 'website:8000' host with the maintainer's real DB snapshot (jonfroehlich, sidewalk, ...). CI has no snapshot, so this config targets a native runserver on localhost:8000 seeded with deterministic demo content via `manage.py seed_demo_projects` + `seed_demo_news`. Keep the two URL lists in sync with what those seed commands create. hideElements hides #djDebug because CI runs DEBUG=True (so runserver serves media), which injects the django-debug-toolbar; its markup is dev-only and was ~76% of the reported violations, so we exclude it to keep the baseline representative of production.", "urls": [ "http://localhost:8000/", "http://localhost:8000/people/",