Skip to content

Commit

Permalink
feat(duplicate-id-aria): set to review on fail and tag as wcag412 (#4075
Browse files Browse the repository at this point in the history
)
  • Loading branch information
WilcoFiers authored Jul 3, 2023
1 parent 55000d0 commit 9f1a3e3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
| [definition-list](https://dequeuniversity.com/rules/axe/4.7/definition-list?application=RuleDescription) | Ensures <dl> elements are structured correctly | Serious | cat.structure, wcag2a, wcag131, EN-301-549, EN-9.1.3.1 | failure | |
| [dlitem](https://dequeuniversity.com/rules/axe/4.7/dlitem?application=RuleDescription) | Ensures <dt> and <dd> elements are contained by a <dl> | Serious | cat.structure, wcag2a, wcag131, EN-301-549, EN-9.1.3.1 | failure | |
| [document-title](https://dequeuniversity.com/rules/axe/4.7/document-title?application=RuleDescription) | Ensures each HTML document contains a non-empty <title> element | Serious | cat.text-alternatives, wcag2a, wcag242, TTv5, TT12.a, EN-301-549, EN-9.2.4.2, ACT | failure | [2779a5](https://act-rules.github.io/rules/2779a5) |
| [duplicate-id-aria](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-aria?application=RuleDescription) | Ensures every id attribute value used in ARIA and in labels is unique | Critical | cat.parsing, wcag2a, wcag411, EN-301-549, EN-9.4.1.1 | failure | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) |
| [duplicate-id-aria](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-aria?application=RuleDescription) | Ensures every id attribute value used in ARIA and in labels is unique | Critical | cat.parsing, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | needs review | [3ea0c8](https://act-rules.github.io/rules/3ea0c8) |
| [form-field-multiple-labels](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels?application=RuleDescription) | Ensures form field does not have multiple label elements | Moderate | cat.forms, wcag2a, wcag332, TTv5, TT5.c, EN-301-549, EN-9.3.3.2 | needs review | |
| [frame-focusable-content](https://dequeuniversity.com/rules/axe/4.7/frame-focusable-content?application=RuleDescription) | Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1 | Serious | cat.keyboard, wcag2a, wcag211, TTv5, TT4.a, EN-301-549, EN-9.2.1.1 | failure, needs review | [akn7bn](https://act-rules.github.io/rules/akn7bn) |
| [frame-title-unique](https://dequeuniversity.com/rules/axe/4.7/frame-title-unique?application=RuleDescription) | Ensures <iframe> and <frame> elements contain a unique title attribute | Serious | cat.text-alternatives, wcag2a, wcag412, TTv5, TT12.d, EN-301-549, EN-9.4.1.2 | needs review | [4b1c6c](https://act-rules.github.io/rules/4b1c6c) |
Expand Down
3 changes: 2 additions & 1 deletion lib/rules/duplicate-id-aria.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"selector": "[id]",
"matches": "duplicate-id-aria-matches",
"excludeHidden": false,
"tags": ["cat.parsing", "wcag2a", "wcag411", "EN-301-549", "EN-9.4.1.1"],
"tags": ["cat.parsing", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
"reviewOnFail": true,
"actIds": ["3ea0c8"],
"metadata": {
"description": "Ensures every id attribute value used in ARIA and in labels is unique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<select id="ignore4"></select>
<div tabindex="0" id="ignore5"></div>

<span id="fail1" class="fail1"></span>
<button id="fail1"></button>
<span id="incomplete1" class="incomplete1"></span>
<button id="incomplete1"></button>
<span id="pass1"></span>
<button id="pass2"></button>
<div aria-labelledby="fail1 pass1 pass2"></div>
<div aria-labelledby="incomplete1 pass1 pass2"></div>

<input id="ignore6" type="hidden" />
<button id="ignore7" disabled></button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"description": "duplicate-id-aria test",
"rule": "duplicate-id-aria",
"violations": [[".fail1"]],
"violations": [],
"incomplete": [[".incomplete1"]],
"passes": [["#pass1"], ["#pass2"]]
}
6 changes: 5 additions & 1 deletion test/integration/rules/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@
// check that all nodes are removed
assert.equal(JSON.stringify(targets), '[]');
} else {
assert(false, 'there are no ' + collection);
assert.lengthOf(
test[collection],
0,
'there are no ' + collection
);
}
});
});
Expand Down

0 comments on commit 9f1a3e3

Please sign in to comment.