mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-21 13:24:08 +03:00
Add pa11y-ci for accessibility testing.
Use pa11y-ci-reporter-html and also upload the HTML results to CI if there are any failures
This commit is contained in:
@@ -32,3 +32,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
|
||||
|
||||
@@ -40,3 +40,5 @@ Thumbs.db
|
||||
# Folders to ignore
|
||||
/js/coverage/
|
||||
/node_modules/
|
||||
/pa11y-ci-report/
|
||||
/pa11y-ci-results.json
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"standard": "WCAG2AA",
|
||||
"level": "error",
|
||||
"concurrency": 4,
|
||||
"defaults": {
|
||||
"runners": [
|
||||
"htmlcs"
|
||||
],
|
||||
"hideElements": ".bd-search"
|
||||
}
|
||||
}
|
||||
Generated
+2168
File diff suppressed because it is too large
Load Diff
+8
-1
@@ -61,8 +61,11 @@
|
||||
"docs-spellcheck": "cspell \"site/**/*.md\" --no-progress",
|
||||
"docs-vnu": "node build/vnu-jar.js",
|
||||
"docs-lint": "npm-run-all --aggregate-output --parallel docs-vnu docs-linkinator docs-spellcheck",
|
||||
"docs-pa11y": "delay 3 && pa11y-ci --config build/.pa11yci.json --sitemap http://localhost:9001/sitemap.xml --sitemap-find https://getbootstrap.com --sitemap-replace http://localhost:9001 --json > pa11y-ci-results.json",
|
||||
"docs-pa11y-html": "pa11y-ci-reporter-html",
|
||||
"docs-accessibility": "npm-run-all --parallel --race docs-serve-only docs-pa11y",
|
||||
"docs-serve": "hugo server --port 9001 --disableFastRender",
|
||||
"docs-serve-only": "npx sirv-cli _site --port 9001",
|
||||
"docs-serve-only": "sirv _site --no-clear --port 9001",
|
||||
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
|
||||
"update-deps": "ncu -u -x globby,karma-browserstack-launcher,stylelint && echo Manually update site/assets/js/vendor",
|
||||
"release": "npm-run-all dist release-sri docs-build release-zip*",
|
||||
@@ -113,6 +116,7 @@
|
||||
"clean-css-cli": "^5.4.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"cspell": "^5.13.1",
|
||||
"delay-cli": "^1.1.0",
|
||||
"eslint": "^8.3.0",
|
||||
"eslint-config-xo": "^0.39.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
@@ -137,6 +141,8 @@
|
||||
"lockfile-lint": "^4.6.2",
|
||||
"nodemon": "^2.0.15",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pa11y-ci": "^3.0.0",
|
||||
"pa11y-ci-reporter-html": "^3.0.2",
|
||||
"postcss": "^8.4.4",
|
||||
"postcss-cli": "^9.0.2",
|
||||
"rollup": "^2.60.2",
|
||||
@@ -144,6 +150,7 @@
|
||||
"rtlcss": "^3.5.0",
|
||||
"sass": "^1.44.0",
|
||||
"shelljs": "^0.8.4",
|
||||
"sirv-cli": "^1.0.14",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-twbs-bootstrap": "^2.2.4",
|
||||
"terser": "^5.10.0",
|
||||
|
||||
Reference in New Issue
Block a user