Repository navigation
USWDS-Site - CI: Upgrade pa11y-ci and fix Chrome launch path - #3286
Draft
ethangardner wants to merge 1 commit into
Draft
ethangardner wants to merge 1 commit into
ethangardner wants to merge 1 commit into
Conversation
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
Upgraded
pa11y-cifrom2.4.2to4.1.1and pointed pa11y's Chrome launch config at the system-installedgoogle-chrome-stablebinary so accessibility CI checks run reliably.Related issue
Closes #[issue_no]
Preview link
Preview link:
Problem statement
pa11y-ciwas pinned to an old2.4.2release. The desired state is an up-to-date, supported version ofpa11y-cithat 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 onnpm test/pa11y CI runs for accessibility regressions.Solution
pa11y-cito^4.1.1inpackage.json(and updatedpackage-lock.jsonaccordingly)."executablePath": "/usr/bin/google-chrome-stable"to thechromeLaunchConfigin both.pa11yciand.pa11yci--mobileso 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 explicitexecutablePathtochromeLaunchConfig.pa11yci--mobile: added explicitexecutablePathtochromeLaunchConfigTesting and review
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.google-chrome-stablepath 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