Visitar URL original
USWDS-Site - CI: Upgrade pa11y-ci and fix Chrome launch path by ethangardner · Pull Request #3286 · uswds/uswds-site · GitHub
Skip to content

USWDS-Site - CI: Upgrade pa11y-ci and fix Chrome launch path - #3286

Draft
ethangardner wants to merge 1 commit into
mainfrom
worktree-upgrade-pa11y-ci
Draft

ethangardner wants to merge 1 commit into
mainfrom
worktree-upgrade-pa11y-ci

Conversation

@ethangardner

Copy link
Copy Markdown
Contributor

Summary

Upgraded pa11y-ci from 2.4.2 to 4.1.1 and pointed pa11y's Chrome launch config at the system-installed google-chrome-stable binary so accessibility CI checks run reliably.

Related issue

Closes #[issue_no]

Preview link

Preview link:

Problem statement

pa11y-ci was pinned to an old 2.4.2 release. The desired state is an up-to-date, supported version of pa11y-ci that reliably launches Chrome in CI. In the current state, the outdated dependency risks incompatibility with newer tooling and lacks fixes/improvements from later releases, affecting anyone relying on npm test/pa11y CI runs for accessibility regressions.

Solution

  1. Bumped pa11y-ci to ^4.1.1 in package.json (and updated package-lock.json accordingly).
  2. Added "executablePath": "/usr/bin/google-chrome-stable" to the chromeLaunchConfig in both .pa11yci and .pa11yci--mobile so Chrome is launched from a known, explicit path rather than relying on auto-detection, which changed between pa11y-ci major versions.

Major changes

  • package.json / package-lock.json: pa11y-ci ^2.4.2 → ^4.1.1
  • .pa11yci: added explicit executablePath to chromeLaunchConfig
  • .pa11yci--mobile: added explicit executablePath to chromeLaunchConfig

Testing and review

  1. Ran npm test / the pa11y CI scripts locally and confirmed Chrome launches successfully and accessibility checks execute against both desktop (.pa11yci) and mobile (.pa11yci--mobile) configs.
  2. Reviewers should confirm the google-chrome-stable path matches what's available in the CI environment (e.g., GitHub Actions runner) and that pa11y-ci v4 output/exit codes are still handled correctly by the CI workflow.

Dependency updates

Dependency name Previous version New version
pa11y-ci 2.4.2 4.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant