PLANET-5275: Adding pa11y commands to get accessibility report #52
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.
Ref: https://jira.greenpeace.org/browse/PLANET-5275
Ref: greenpeace/planet4#73
Requires: greenpeace/planet4-base#91 (pa11y configuration)
Related to: greenpeace/planet4-master-theme#1165 (run on master-theme)
This PR adds some targets to install and launch pa11y-ci.
Example report is visible on circle-ci https://9211-80401279-gh.circle-artifacts.com/0/planet4-docker-compose/artifacts/pa11y/index.html
Modifications
install-pa11y
installs 2 packages,pa11y-ci
to run pa11y,pa11y-ci-reporter-html
to generate the report. It also adds dependencies needed for puppeteer.test-pa11y-ci
runs with option-j
to get a json report,-T 1000
to fail only after 1000 errors (we don't want the job to block anything directly, the CI will decide on what condition to fail). The HTML report is generated with a second command, passing the json topa11y-ci-reporter-html
. It will runinstall-pa11y
first, and is designed for the CI.test-pa11y
is there to run pa11y locally, with a local configuration. It is possible to specify another configuration file by usingPA11Y_LOCAL_CONF
variable:PA11Y_LOCAL_CONF="my-conf.json" make test-pa11y
install-puppeteer-deps
is based on puppeteer/puppeteer#290 (comment).Test
You can test it locally, by running the targets
install-pa11y
thentest-pa11y
.