webdriver-accessibility-audit
v1.1.6
Published
Accessibility checker
Downloads
15
Readme
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
- ariaOnReservedElement
- ariaOwnsDescendant
- ariaRoleNotScoped
- audioWithoutControls
- badAriaAttribute
- badAriaAttributeValue
- badAriaRole
- controlsWithoutLabel
- duplicateId
- elementsWithMeaningfulBackgroundImage
- focusableElementNotVisibleAndNotAriaHidden
- humanLangMissing
- imagesWithoutAltText
- linkWithUnclearPurpose
- lowContrastElements
- mainRoleOnInappropriateElement
- multipleAriaOwners
- multipleLabelableElementsPerLabel
- nonExistentAriaRelatedElement
- pageWithoutTitle
- requiredAriaAttributeMissing
- requiredOwnedAriaRoleMissing
- roleTooltipRequiresDescribedby
- tabIndexGreaterThanZero
- tableHasAppropriateHeaders
- uncontrolledTabpanel
- unfocusableElementsWithOnClick
- unsupportedAriaAttribute
- videoWithoutCaptions