Skip to content

Commit 7120a4b

Browse files
committed
Add pa11y-ci for accessibility testing.
Add pa11y-ci-reporter-html and also upload the HTML results to CI if there are failures
1 parent cfd00b5 commit 7120a4b

File tree

5 files changed

+800
-1
lines changed

5 files changed

+800
-1
lines changed

.github/workflows/docs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,17 @@ jobs:
4040

4141
- name: Test docs
4242
run: npm run docs
43+
44+
- name: Run accessibility tests
45+
run: npm run docs-accessibility
46+
47+
- name: Generate HTML accessibility results
48+
run: npm run docs-pa11y-html
49+
if: failure()
50+
51+
- name: Upload accessibility results
52+
uses: actions/upload-artifact@v2
53+
if: failure()
54+
with:
55+
name: pa11y-ci-results
56+
path: .pa11y/

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ Thumbs.db
5050
# Folders to ignore
5151
/js/coverage/
5252
/node_modules/
53+
/.pa11y/
54+
/pa11y-ci-results.json

build/.pa11yci.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"standard": "WCAG2AA",
3+
"level": "error",
4+
"concurrency": 4,
5+
"runners": [
6+
"htmlcs"
7+
],
8+
"defaults": {
9+
"hideElements": ".bd-search, [class*=-success], [class*=-info], [class*=-light]"
10+
}
11+
}

0 commit comments

Comments
 (0)