forked from twbs/bootstrap
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pa11y-ci for automated accessibility tests
- Loading branch information
1 parent
2e393bb
commit 95fa79a
Showing
5 changed files
with
2,319 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "dependabot/**" | ||
pull_request: | ||
|
||
env: | ||
FORCE_COLOR: 2 | ||
NODE: 16 | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "${{ env.NODE }}" | ||
cache: npm | ||
|
||
- run: java -version | ||
|
||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Compile dist | ||
run: npm run dist | ||
|
||
- name: Update sri | ||
run: npm run release-sri | ||
|
||
- name: Test docs | ||
run: npm run docs-build | ||
|
||
- name: Run accessibility tests | ||
run: npm run docs-accessibility-json | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,7 @@ Thumbs.db | |
# Folders to ignore | ||
/js/coverage/ | ||
/node_modules/ | ||
|
||
# Pa11y | ||
/pa11y-ci-report/ | ||
pa11y-ci-results.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"standard": "WCAG2AA", | ||
"level": "error", | ||
"concurrency": 4, | ||
"defaults": { | ||
"runners": [ | ||
"htmlcs" | ||
], | ||
"hideElements": "" | ||
} | ||
} |
Oops, something went wrong.