Skip to content

ci(chatislam): make a11y-axe workflow functional (chromedriver match + contrast fixes) - #22

Merged
acamarata merged 2 commits into
mainfrom
fix/a11y-axe-chromedriver
Jun 25, 2026
Merged

acamarata merged 2 commits into
mainfrom
fix/a11y-axe-chromedriver

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Problem

The advisory a11y-axe gate never actually ran axe. After two prior fixes (dev-server start, removed invalid --reporter), @axe-core/cli still failed: its bundled chromedriver tracks the latest Chrome stable and mismatched the runner's pre-installed Chrome (exit 2 — "This version of ChromeDriver only supports Chrome version N").

Fix

  • Add nanasess/setup-chromedriver@v3 — auto-installs the ChromeDriver matching the runner's Chrome at /usr/local/bin/chromedriver.
  • Pass --chromedriver-path to both axe calls; pin the bundled chromedriver npm package via CHROMEDRIVER_FILEPATH as a fallback for the known --chromedriver-path ignored bug.
  • Add CI-stable --chrome-options (no-sandbox, disable-dev-shm-usage).

Contrast fixes (real WCAG 2.1/2.2 AA failures axe now surfaces)

Element Before After
Disclaimer link mid-green on dark — 3.6:1 light-green — 6.1:1
Footer copyright opacity 0.4 — 3.1:1 opacity 0.7 — 6.4:1

Also dropped the homepage --include scope so the <footer> is actually audited.

Gate stays continue-on-error: true (advisory until P4 baselines).

The @axe-core/cli bundled chromedriver tracks latest Chrome stable and
mismatched the runner's pre-installed Chrome (exit 2). Install the matching
driver via nanasess/setup-chromedriver and point axe at it; also pin the
bundled chromedriver package via CHROMEDRIVER_FILEPATH as a fallback.

Fix the two WCAG AA color-contrast violations this now surfaces:
- disclaimer link mid-green (3.6:1) -> light-green (6.1:1)
- footer copyright opacity 0.4 (3.1:1) -> 0.7 (6.4:1)

Drop the homepage --include scope so the footer is actually audited.
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ummat-chatislam Ready Ready Preview, Comment Jun 25, 2026 6:16pm

Request Review

@github-actions

Copy link
Copy Markdown

🟢 Rampart Security Gate — CLEAN

Tool CRITICAL HIGH MEDIUM LOW
(no findings)

Totals: 0 critical · 0 high · 0 medium · 0 low

Mode: RAMPART_ENFORCE=warn

axe now runs on /chat and surfaced 4 real issues:
- queries-remaining + empty-state + powered-by text: brand-green-mid/low
  opacity on dark panels (2.8-4.1:1) -> light-green / opacity 0.7 (>=6:1)
- Turnstile wrapper: aria-label on roleless div -> add role=group

Note: the queries-remaining warning color #ff9966 (shown only at <=1 query
left) is ~3.7:1 on the dark panel; left as an intentional alert color.
@acamarata

Copy link
Copy Markdown
Contributor Author

Verified on CI — the a11y-axe gate is now functional.

Run Result
first run (chromedriver fix only) axe executed/ clean, /chat reported 4 real WCAG findings (exit 1) — proving setup works
second run (after contrast/aria fixes) both / and /chat0 violations, axe step exits 0

Before this PR the step died with exit 2 (ChromeDriver only supports Chrome version N) before axe ever ran. Now nanasess/setup-chromedriver@v3 installs the runner-matched driver, axe runs against real headless Chrome, and the result reflects genuine findings. Gate remains continue-on-error: true (advisory) but currently passes clean.

@acamarata
acamarata merged commit 67f1fe3 into main Jun 25, 2026
15 of 19 checks passed
@acamarata
acamarata deleted the fix/a11y-axe-chromedriver branch June 25, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant