Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(aria-braille-equivalent): Update to be reviewOnFail #4123

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/rule-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| :------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------- | :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [area-alt](https://dequeuniversity.com/rules/axe/4.7/area-alt?application=RuleDescription) | Ensures <area> elements of image maps have alternate text | Critical | cat.text-alternatives, wcag2a, wcag244, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.2.4.4, EN-9.4.1.2, ACT | failure, needs review | [c487ae](https://act-rules.github.io/rules/c487ae) |
| [aria-allowed-attr](https://dequeuniversity.com/rules/axe/4.7/aria-allowed-attr?application=RuleDescription) | Ensures an element's role supports its ARIA attributes | Critical | cat.aria, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | failure, needs review | [5c01ea](https://act-rules.github.io/rules/5c01ea) |
| [aria-braille-equivalent](https://dequeuniversity.com/rules/axe/4.7/aria-braille-equivalent?application=RuleDescription) | Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent | Serious | cat.aria, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | failure, needs review | |
| [aria-braille-equivalent](https://dequeuniversity.com/rules/axe/4.7/aria-braille-equivalent?application=RuleDescription) | Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent | Serious | cat.aria, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | needs review | |
| [aria-command-name](https://dequeuniversity.com/rules/axe/4.7/aria-command-name?application=RuleDescription) | Ensures every ARIA button, link and menuitem has an accessible name | Serious | cat.aria, wcag2a, wcag412, TTv5, TT6.a, EN-301-549, EN-9.4.1.2, ACT | failure, needs review | [97a4e1](https://act-rules.github.io/rules/97a4e1) |
| [aria-conditional-attr](https://dequeuniversity.com/rules/axe/4.7/aria-conditional-attr?application=RuleDescription) | Ensures ARIA attributes are used as described in the specification of the element's role | Serious | cat.aria, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | failure | [5c01ea](https://act-rules.github.io/rules/5c01ea) |
| [aria-deprecated-role](https://dequeuniversity.com/rules/axe/4.7/aria-deprecated-role?application=RuleDescription) | Ensures elements do not use deprecated roles | Minor | cat.aria, wcag2a, wcag412, EN-301-549, EN-9.4.1.2 | failure | [674b10](https://act-rules.github.io/rules/674b10) |
Expand Down
1 change: 1 addition & 0 deletions lib/rules/aria-braille-equivalent.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"id": "aria-braille-equivalent",
"reviewOnFail": true,
"impact": "serious",
"selector": "[aria-brailleroledescription], [aria-braillelabel]",
"tags": ["cat.aria", "wcag2a", "wcag412", "EN-301-549", "EN-9.4.1.2"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button id="pass1" aria-braillelabel="hello">Hello</button>
<button id="pass2" aria-braillelabel=""></button>
<button id="fail1" aria-braillelabel="hello"></button>
<button id="incomplete1" aria-braillelabel="hello"></button>

<aside
id="pass3"
Expand All @@ -21,7 +21,7 @@
></aside>

<aside
id="fail2"
id="incomplete2"
aria-roledescription=""
aria-brailleroledescription="table of contents"
></aside>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"description": "aria-braille-equivalent tests",
"rule": "aria-braille-equivalent",
"passes": [["#pass1"], ["#pass2"], ["#pass3"], ["#pass4"], ["#pass5"]],
"violations": [["#fail1"], ["#fail2"]]
"incomplete": [["#incomplete1"], ["#incomplete2"]],
"violation": []
}
12 changes: 6 additions & 6 deletions test/integration/virtual-rules/aria-braille-equivalent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('aria-braille-equivalent virtual-rule', () => {
assert.lengthOf(results.incomplete, 0);
});

it('fails when accessible text is empty but braille label is not', () => {
it('incompletes when accessible text is empty but braille label is not', () => {
const results = axe.runVirtualRule('aria-braille-equivalent', {
nodeName: 'img',
attributes: {
Expand All @@ -27,8 +27,8 @@ describe('aria-braille-equivalent virtual-rule', () => {
});

assert.lengthOf(results.passes, 0);
assert.lengthOf(results.violations, 1);
assert.lengthOf(results.incomplete, 0);
assert.lengthOf(results.violations, 0);
assert.lengthOf(results.incomplete, 1);
});

it('passes when roledescription and brailleroledescription are not empty', () => {
Expand All @@ -45,7 +45,7 @@ describe('aria-braille-equivalent virtual-rule', () => {
assert.lengthOf(results.incomplete, 0);
});

it('fails when roledescription is empty but brailleroledescription is not', () => {
it('incompletes when roledescription is empty but brailleroledescription is not', () => {
const results = axe.runVirtualRule('aria-braille-equivalent', {
nodeName: 'div',
attributes: {
Expand All @@ -55,8 +55,8 @@ describe('aria-braille-equivalent virtual-rule', () => {
});

assert.lengthOf(results.passes, 0);
assert.lengthOf(results.violations, 1);
assert.lengthOf(results.incomplete, 0);
assert.lengthOf(results.violations, 0);
assert.lengthOf(results.incomplete, 1);
});

it('incompletes if the subtree fails to compute with aria-braillelabel', () => {
Expand Down