feat: Add a11y tests and GitHub action #460
Draft
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 | Résumé
Add cypress e2e test to test the accessibility of all pages on the documentation site. Also updated an old GitHub workflow to run these tests on pull request into main and merge into main.
Also includes some accessibility fixes that were identified by the tests, mostly misaligned HTML and headings.
How to use
Run tests in browser
npm run start
to start a local version of the documentation sitenpm run cy:open
Run tests in terminal
npm run cy:run
cds-snc/design-gc-conception#1192
Note: Tests fail at the moment because of how we preview components that our landmarks. Brainstorming a different way to preview them.