nemo-accessibility is a nemo plugin aimed to run accessibility scans during nemo tests. nemo-accessibility plugin uses axe-core, htmlcode smiffer and chrome engines to run accessibility scans on a given page or on a given element on a page.
npm install nemo-accessibilitynemo-accessibility is a nemo plugin aimed to run accessibility scans during nemo tests. nemo-accessibility plugin uses axe-core, htmlcode smiffer and chrome engines to run accessibility scans on a given page or on a given element on a page.
npm install nemo-accessibility --save-devconfig/nemo-plugins.json file like below`` javascript`
"nemo-accessibility":{
"module":"nemo-accessibility",
"arguments": [
{
"engine":"axe"
"engine":"chrome"
"engine":"htmlcs"
}
]
}let results= await nemo.accessibility.scan({'project': 'mynodewebproject', 'page': 'somepageName'})
3. Call Scan method
Once nemo-accessibility plugin is registered, you should now have nemo.accessibility namespace available in your tests. nemo.accessibility exposes a method called scan to help you run accessibility evaluation against your page/element.
scan method returns a promise with resulting json response and you can then write the HTML to a file or parse JSON response for later reporting. For example,
`` javascript`
nemo.driver.get('http://www.paypal.com');
nemo.accessibility.scan().then(function (result) {
fs.writeFile('report/accessibility.json', result, function (err) {
done();
});
});DEBUG=nemo* node node_modules/nemo-accessibility/example/usingNemoAccessibility.js`
See usingNemoAccessibility.js. You can run that on Debug mode like
[1]: https://github.com/paypal/nemo-accessibility/issues "File a ticket for Nemo a11y plugin"
[2]: https://github.com/paypal/AATT/issues "File a ticket for AATT"
Copyright 2019, PayPal under the BSD license.