Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Add accessibility scans #38

Merged
merged 8 commits into from
Dec 6, 2021
Merged

Add accessibility scans #38

merged 8 commits into from
Dec 6, 2021

Conversation

rahearn
Copy link
Collaborator

@rahearn rahearn commented Dec 2, 2021

closes #37

  • Adds pa11y-ci for running accessibility scans locally and in Github actions
    • locally: ./bin/pa11y-scan
    • Github actions happens on each PR
  • Adds shared actions for setting up ruby/node/database and for running a server in the background
  • Creates a ci Rails environment, that closely matches production. This helps pa11y and security scans not get tripped up by false positives that happen in development and test environments

Github Action will add a comment to the associated PR if it detects a problem

Can be run with `yarn run pa11y-ci`
CI environment matches production closely, while giving us the ability to verify
that we are not running in production.

This will be important for scanning pages that in production are only available
to logged-in users
@rahearn rahearn requested a review from hartsick December 2, 2021 17:15
@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Pa11y Failures detected

Show failure message


@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Pa11y Failures detected

Show failure message


@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Pa11y Failures detected

Show failure message


Copy link
Contributor

@hartsick hartsick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test out locally yet because I need the Rails master key, but looks good! A question and thought, neither blocking:

  • Should we add the pa11y scan to our default rake task? (I'm inclined to, treat it as part of test suite we expect to pass)
  • I've not used pa11y before on projects, only axe-core/matchers. I'd love to talk with you about how we expect this to work to make sure my understand is correct, and to talk about if there's a way to make sure that we're continuing to include new pages in a11y scans (I see there's a config—does it web crawl, or do we need to add each new URL in order to be scanned? Or should we think about pointing it at a site map down the road?)

@rahearn
Copy link
Collaborator Author

rahearn commented Dec 6, 2021

Should we add the pa11y scan to our default rake task? (I'm inclined to, treat it as part of test suite we expect to pass)

I'm 50/50 on this. I like the default scan to be real quick, and pa11y is maybe a bit slower than I'd like. Maybe a task that does both the default and also runs pa11y that we can get in the habit of using? Or add it to the default and back it out to the full if/when it takes too long? Either way I'll create a new task to do that.

@rahearn rahearn merged commit f8167da into main Dec 6, 2021
@rahearn rahearn deleted the ci/pa11y branch December 6, 2021 14:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run a11y scans on code push
2 participants