Rule ID | Description | Tags |
---|---|---|
accesskeys | Ensures every accesskey attribute value is unique | wcag2a, wcag211 |
area-alt | Ensures <area> elements of image maps have an alternate text | wcag2a, wcag111, section508, section508a |
aria-allowed-attr | Ensures all attributes that start with 'aria-' are valid for an element's role | wcag2a, wcag411 |
aria-required-attr | Ensures all elements that contain WAI-ARIA roles to ensure that all required ARIA attributes are present | wcag2a, wcag411 |
aria-required-children | Checks all elements that contain a WAI-ARIA role to ensure that all required children roles are present | wcag2a, wcag411 |
[ari |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Testing Group Labels</title> | |
</head> | |
<body> | |
<a href="#">before</a> | |
<h2>Wrong Way</h2> | |
<div role="group" aria-labelledby="selectAdministratorHeader" id="selectAdministrator"> | |
<div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="rowTemplate" type="text/x-handlebars-template"> | |
<tr> | |
<th scope="row" class="help"> | |
<a href="javascript:;" class="rule" data-index="{{index}}"> | |
{{{help}}} | |
</a> | |
</th> | |
<td scope="row"> | |
<a target="_blank" href="{{helpUrl}}">?</a> | |
</td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
results.violations.map(function (rule) { | |
return { | |
id: rule.id, | |
count: rule.nodes.length | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const colors = require('colors'); | |
const link = colors.underline.blue; | |
const error = colors.red.bold; | |
function selectorToString(selectors, separator) { | |
separator = separator || ' ' | |
return selectors | |
.reduce((prev, curr) => prev.concat(curr), []) | |
.join(separator) | |
} |