Skip to content

Commit

Permalink
Bug #30, Accessibility fixes - via pa11y-ci [iet:10304380]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Mar 2, 2018
1 parent 950d23b commit beb3c25
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
14 changes: 9 additions & 5 deletions .pa11yci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
"#": "Automated accessibility testing ~ https://github.com/pa11y/pa11y-ci",

"defaults": {
"standard": "WCAG2AA",
"timeout": 5000
"standard": "WCAG2A",
"threshold": 0,
"timeout": 8000,
"wait": 3000,
"verifyPage": "idc-container",
"ignore": [ "notice", "warning" ]
},
"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"
"http://127.0.0.1:4000/2017/05/14/gaad-widget.html?&_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"
"http://freear.org.uk/moodle/?_ua=pa11y-ci",
"https://github.com/nfreear/nfreear.github.io"
]
}
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# https://jekyllrb.com/docs/continuous-integration/

language: ruby
rvm:
- 2.1

rvm: 2.1

git:
depth: 8
Expand All @@ -12,11 +12,8 @@ bundler_args: --without benchmark:site:development
cache: bundler
sudo: false

before_install:
before_install: nvm install v8.1
# Was: - nvm install v4.4
- nvm install v8.1
#- npm i npm -g
- npm -v

install:
- bundle install
Expand All @@ -27,13 +24,13 @@ 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
- npm run version
# http://cruft.io/posts/automated-accessibility-testing-node-travis-ci-pa11y/
# Sleep while Github-Pages re-builds ... ?
- npm run pa11y-ci # sleep 40;

notifications:
webhooks:
Expand Down
5 changes: 4 additions & 1 deletion _sass/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ img[ src *= "open-media-player/badge.svg" ] {
}

.post-content img[ src *= "shields.io" ] {
width: 120px; height: 30px; // x 1.5;
// width: 120px; height: 30px; // x 1.5;
}
.X-site-footer img[ src *= "shields.io" ] {
width: 96px; height: 24px; // x 1.2;
Expand Down Expand Up @@ -156,6 +156,9 @@ iframe {
#idc-container {
display: none;
}
#IDCommentNewThreadText {
width: 99% !important;
}

.ajax-loader {
border: 1px solid #ddd;
Expand Down
15 changes: 14 additions & 1 deletion js/idc-comments-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ window.jQuery(function ($) {
'use strict';

var accessibility_fixes = {
// Fixes, via "pa11y-ci" !
'#IDCSubscribeEmail0, #IDCSubscribeEmail1': { title: 'Email address' },
'#IDCommentNewThreadText, #txtComment': { title: 'Enter text' },
'#IDfrmHeaderWPLogin img': { alt: 'Login via WordPress' },
'#IDCommentUserBarLink1, #IDCommentUserBarLink2': { title: 'User bar' },
'#id_twName_Reply': { title: 'Reply' },
'#id_twName_NewThread': { title: 'New thread' },
'#id_twAvatar_Reply': { alt: 'Reply' },
'#id_twAvatar_NewThread': { alt: 'New thread' },
'#idc-container iframe[ src *= empty ]': { title: '(empty)' },
'#idc-container img[ src *= remoteCheckin ]': { alt: '(remote checkin)' },

// Original fixes.
'a[ href *= "javascript:" ]': { role: 'button' },
'a.idc-close': { title: 'Close', role: 'button' },
'#idc-container #txtEmailNewThread': { type: 'email', placeholder: 'joe@example.org' },
Expand All @@ -29,7 +42,7 @@ window.jQuery(function ($) {
// "#IDComment1000836892"
var comment_hash_re = /(#IDComment(\d+))/;
var m_hash = W.location.hash.match(comment_hash_re);
var script_src = '//intensedebate.com/js/genericCommentWrapper2.php?';
var script_src = 'https://intensedebate.com/js/genericCommentWrapper2.php?';

// 1. Comment configuration.
var params = {
Expand Down

0 comments on commit beb3c25

Please sign in to comment.