Files
angular__angular/tools/axe-protractor/build-message.js
T
Paul Gschwendtner c5fb94f2a4 chore: run a11y audits on protractor (#2010)
* chore: run a11y audits on protractor

* Fixes accessibility issue in grid-list with `role="listitem"`
* Adds protractor plugin to run aXe-core accessibility audits
* Fixes a bunch of a11y issues in the e2e app to make the aXe audits green

* Force menu y-positions because viewport might be different on Selenium browsers.

* Navigiation links should be hidden by default because those can interfere with the tests.
2016-12-13 12:10:31 -08:00

16 lines
426 B
JavaScript

/**
* Builds a simple message of the violation results of axe-core by listing
* each violation and the associated element selector in a new line.
* @param {!axe.Violation} violation
*/
exports.buildMessage = violation => {
let selectors = violation.nodes.map(node => {
return node.target.join(' ');
});
return selectors.reduce((content, selector) => {
return content + '- ' + selector + '\n';
}, '');
};