From 53c7ee4d38a81378e318a60ca5e1543306be21b4 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Tue, 8 Aug 2023 17:19:39 +0200 Subject: [PATCH] chore(aria-braille-equivalent): Update to be reviewOnFail (#4123) * chore(aria-braille-equivalent): Update to be reviewOnFail * Virtual tests --- doc/rule-descriptions.md | 2 +- lib/rules/aria-braille-equivalent.json | 1 + .../aria-braille-equivalent.html | 4 ++-- .../aria-braille-equivalent.json | 3 ++- .../virtual-rules/aria-braille-equivalent.js | 12 ++++++------ 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/rule-descriptions.md b/doc/rule-descriptions.md index 0978c3f916..710f464ccb 100644 --- a/doc/rule-descriptions.md +++ b/doc/rule-descriptions.md @@ -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) | diff --git a/lib/rules/aria-braille-equivalent.json b/lib/rules/aria-braille-equivalent.json index a93f859c94..a406e59fb1 100644 --- a/lib/rules/aria-braille-equivalent.json +++ b/lib/rules/aria-braille-equivalent.json @@ -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"], diff --git a/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.html b/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.html index 55b9874d70..c5aa2eb572 100644 --- a/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.html +++ b/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.html @@ -1,6 +1,6 @@ - + diff --git a/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.json b/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.json index 725223482e..d1982970f2 100644 --- a/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.json +++ b/test/integration/rules/aria-braille-equivalent/aria-braille-equivalent.json @@ -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": [] } diff --git a/test/integration/virtual-rules/aria-braille-equivalent.js b/test/integration/virtual-rules/aria-braille-equivalent.js index 481697f0e9..cb20f39553 100644 --- a/test/integration/virtual-rules/aria-braille-equivalent.js +++ b/test/integration/virtual-rules/aria-braille-equivalent.js @@ -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: { @@ -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', () => { @@ -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: { @@ -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', () => {