Skip to content

Commit

Permalink
Add pa11y-ci for accessibility testing.
Browse files Browse the repository at this point in the history
Add pa11y-ci-reporter-html and also upload the HTML results to CI if there are failures
  • Loading branch information
XhmikosR committed Sep 6, 2021
1 parent aa06dff commit 0e4ec45
Show file tree
Hide file tree
Showing 5 changed files with 796 additions and 1 deletion.
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,
"runners": [
"htmlcs"
],
"defaults": {
"hideElements": ".bd-search, [class*=-success], [class*=-info], [class*=-light]"
}
}
Loading

0 comments on commit 0e4ec45

Please sign in to comment.