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

Add pa11y-ci for automated accessibility tests #29315

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ jobs:

- name: Test docs
run: npm run docs

- name: Run accessibility tests
run: npm run docs-accessibility

- name: Generate HTML accessibility results
run: npm run docs-pa11y-html
if: failure()

- name: Upload accessibility results
uses: actions/upload-artifact@v2
if: failure()
with:
name: pa11y-ci-results
path: pa11y-ci-report/
if-no-files-found: error
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ Thumbs.db
# Folders to ignore
/js/coverage/
/node_modules/
/pa11y-ci-report/
/pa11y-ci-results.json
11 changes: 11 additions & 0 deletions build/.pa11yci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"standard": "WCAG2AA",
"level": "error",
"concurrency": 4,
"defaults": {
"runners": [
"htmlcs"
],
Copy link
Member

@patrickhlauke patrickhlauke Mar 31, 2020

Choose a reason for hiding this comment

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

worth adding "ignore": [ "notice", "warning" ] here in the defaults and seeing if that stops the various "best practice" issues we're now seeing flagged up by axe

"hideElements": ".bd-search"
}
}
Loading