Test automation
Prevents broken code from going to production
Accessibility
People with Disabilities
Visual: Blind, low-vision, color blind
Hearing: Deaf, hard-of-hearing
Motor: spinal cord injury, MS, Cerebral palsy, ALS
Cognitive: Autism, learning, TBI, memory, attention
Accessibility & Automated Testing
sitting in a tree...
Test low-hanging fruit
Document accessibility intent
Prevent regressions
Get help from experts
NOT a substitute for actual user testing
WCAG & Section 508
Guidelines and rules for creating accessible websites
WCAG = guidelines
Section 508 = required for gov't agencies
The A11Y Testing Situation
We can automate testing in browsers, but not assistive technologies (yet).
Best practices and development tools help here.
Easy wins
Use tools to help you find:
Lacking keyboard support
Missing labels
Invalid ARIA attributes
Color contrast
…and more!
What is axe-core?
JavaScript library for accessibility testing
Engine powering browser extensions, test integrations
A handy unit testing tool
Open source*
Document accessibility intent
~and~
prevent regressions
with test coverage
Unit testing with axe-core
Install from npm:
npm install axe-core --save-dev
Include script and run tests:
var axe = require('axe-core');
describe('Custom component', function() {
it('should have no a11y violations', function(done) {
axe.a11yCheck('.some-element-selector', {}, function (results) {
expect(result.violations.length).toBe(0);
done();
});
});
});
What is axe-webdriverjs?
An open source library that injects axe-core into Selenium Webdriver instances
Integration testing with axe-webdriverjs
npm install axe-webdriverjs --save-dev
var AxeBuilder = require('axe-webdriverjs'),
WebDriver = require('selenium-webdriver');
var driver = new WebDriver.Builder()
.forBrowser('firefox')
.build();
driver
.get('https://localhost:4000')
.then(function (done) {
AxeBuilder(driver)
.analyze(function (results) {
expect(results.violations.length).toBe(0);
done();
});
});
The aXe Team
(besides yours truly)
To a11y and beyond!