mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c5fb94f2a4
* 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.
16 lines
426 B
JavaScript
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';
|
|
}, '');
|
|
|
|
}; |