node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

webdriver-accessibility-audit

webdriver-accessibility-audit

Accessibility audits during webdriver tests

Installation

$ npm install webdriver-accessiblity-audit --save-dev

Writing tests

In your protractor test you can include an audit as following:

var options = {
    resultPath: 'test/accessibility/audits',
    auditRulesToIgnore: ['lowContrastElements']
};
var accessibility = require('webdriver-accessibility-audit')(browser, options);
 
describe('protractor test', function() {
    ...
 
    it('does an audit', function() {
        ....
        accessiblity.audit('nameOfAudit');
        ....
    });
 
    ...
})

Possible rules