Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLANET-5275: Adding pa11y commands to get accessibility report #52

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

lithrel
Copy link
Contributor

@lithrel lithrel commented Aug 18, 2020

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

  • New targets for pa11y-ci and pa11y-ci-reporter-html
    • 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 -jto 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 to pa11y-ci-reporter-html. It will run install-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 using PA11Y_LOCAL_CONF variable: PA11Y_LOCAL_CONF="my-conf.json" make test-pa11y
  • Extraction of report as artifacts for consultation in CI

install-puppeteer-deps is based on puppeteer/puppeteer#290 (comment).

Test

You can test it locally, by running the targets install-pa11y then test-pa11y.

Makefile Show resolved Hide resolved
@lithrel lithrel force-pushed the planet-5275 branch 2 times, most recently from 5f6cfa8 to ec0f001 Compare August 26, 2020 09:33
Ref: https://jira.greenpeace.org/browse/PLANET-5275

- Installation of pa11y-ci and pa11y-ci-reporter-html
- Extraction of report as artifacts for consultation in CI
@lithrel lithrel merged commit 6b0688e into master Sep 15, 2020
@comzeradd comzeradd deleted the planet-5275 branch July 28, 2021 08:50
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.

2 participants