Skip to content

Commit

Permalink
Bug #30, Integrate "pa11y-ci" accessibility testing [iet:10304380]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Feb 13, 2018
1 parent bd4301f commit 992927b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .pa11yci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"#": "Automated accessibility testing ~ https://github.com/pa11y/pa11y-ci",

"defaults": {
"standard": "WCAG2AA",
"timeout": 5000
},
"urls": [
"https://nick.freear.org.uk/2017/05/14/gaad-widget.html?gaadwidget=force&_ua=pa11y-ci"
],

"X-LOCAL-urls": [
"http://127.0.0.1:4000/?&_ua=pa11y-ci"
],

"X-UNUSED--urls": [
"https://nick.freear.org.uk/2017/05/14/gaad-widget.html?gaadwidget=force&_ua=pa11y-ci",
"http://freear.org.uk/?_ua=pa11y-ci",
"http://freear.org.uk/moodle/?_ua=pa11y-ci"
]
}
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ script:
- npm test
- npm run build
# http://localhost:4000
# http://cruft.io/posts/automated-accessibility-testing-node-travis-ci-pa11y/
# Sleep while Github-Pages re-builds ... ?
- sleep 40; npm run pa11y-ci

after_script:
- npm run count
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Prose.io][prose-icon]][prose.io]
[![Blog posts][blog-icon]][blog]
[![Blog up][up-icon]][blog]
[![Accessibility testing - blog passes][pa11y-icon]][pa11y-ci]
[![@nfreear on Twitter][twit-icon]][twitter]


Expand Down Expand Up @@ -39,7 +40,7 @@ npm start

---

© 2009-2017 Nick Freear.
© 2009-2018 Nick Freear.

* All content in `_posts`, `_pages` & other Markdown/HTML pages (`*.md`, `*.markdown`, `*.html`) are
released under a [Creative Commons Attribution-ShareAlike 4.0 International License ![CC by-sa][cc-icon]][cc]
Expand Down Expand Up @@ -67,4 +68,9 @@ npm start
[travis-icon]: https://travis-ci.org/nfreear/nfreear.github.io.svg
[travis-ci]: https://travis-ci.org/nfreear/nfreear.github.io "Build status – Travis-CI"

[pa11y-ci]: https://github.com/pa11y/pa11y-ci
"Automated accessibility testing - via 'pa11y-ci'"
[pa11y-icon]: https://img.shields.io/badge/accessibility-pa11y--ci-blue.svg
[wcag-icon]: https://img.shields.io/badge/accessibility-WCAG_2.0_AAA-green.svg

[up-icon]: https://img.shields.io/website-up-down-green-red/http/nick.freear.org.uk.svg?label=Blog
1 change: 1 addition & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
<i class="sr-only">Show / hide navigation<i>
</a>

<div class="trigger">
Expand Down
3 changes: 3 additions & 0 deletions _sass/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ h1,h2,h3,h4,h5,

/* Accessibility [a11y].
*/
a {
color: #2474dc; // Was: #2a7ae2;
}
.sr-only {
position: absolute;
top: -1000px;
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-sass": "^1.0.0",
"grunt-exec": "^1.0.0",
"pa11y-ci": "^1.3.1",
"semistandard": "^11.0.0"
},
"scripts": {
Expand All @@ -18,6 +19,7 @@
"start": "jekyll serve --drafts --unpublished --future",
"version": "bundle exec jekyll --version",
"count": "grunt exec:count",
"pa11y-ci": "pa11y-ci --config .pa11yci.json",
"fix": "semistandard --fix",
"test": "grunt && semistandard"
},
Expand Down

0 comments on commit 992927b

Please sign in to comment.