diff --git a/lib/rules/aria-toggle-field-name.json b/lib/rules/aria-toggle-field-name.json index baccc7fafc..9417897965 100644 --- a/lib/rules/aria-toggle-field-name.json +++ b/lib/rules/aria-toggle-field-name.json @@ -1,6 +1,6 @@ { "id": "aria-toggle-field-name", - "selector": "[role=\"checkbox\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"radio\"], [role=\"switch\"]", + "selector": "[role=\"checkbox\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"], [role=\"radio\"], [role=\"switch\"], [role=\"option\"]", "matches": "no-naming-method-matches", "tags": ["cat.aria", "wcag2a", "wcag412"], "metadata": { diff --git a/package-lock.json b/package-lock.json index cd4d27913f..d0aac0541b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3705,7 +3705,8 @@ "esbuild": { "version": "0.7.19", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.7.19.tgz", - "integrity": "sha512-0Ur8ZtuRPwJMj4+VjRLqn5z88WXf+2etZhe4dBA6eYFcdviQefb+Vrd59cTk0VXg08NU/BnAMkalCMHI8lig/A==" + "integrity": "sha512-0Ur8ZtuRPwJMj4+VjRLqn5z88WXf+2etZhe4dBA6eYFcdviQefb+Vrd59cTk0VXg08NU/BnAMkalCMHI8lig/A==", + "dev": true }, "escalade": { "version": "3.0.1", diff --git a/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.html b/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.html index 45baa124f8..4f629d5360 100644 --- a/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.html +++ b/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.html @@ -40,6 +40,9 @@ off on +
+
Hello world
+
@@ -61,6 +64,15 @@ +
+
+
diff --git a/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.json b/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.json index ead88c28ae..05ae4c2064 100644 --- a/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.json +++ b/test/integration/rules/aria-toggle-field-name/aria-toggle-field-name.json @@ -1,7 +1,21 @@ { "description": "aria-toggle-field-name test", "rule": "aria-toggle-field-name", - "passes": [["#pass1"], ["#pass2"], ["#pass3"], ["#pass4"], ["#pass5"]], - "violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"], ["#fail5"]], + "passes": [ + ["#pass1"], + ["#pass2"], + ["#pass3"], + ["#pass4"], + ["#pass5"], + ["#pass6"] + ], + "violations": [ + ["#fail1"], + ["#fail2"], + ["#fail3"], + ["#fail4"], + ["#fail5"], + ["#fail6"] + ], "incomplete": [["#canttell1"], ["#canttell2"]] } diff --git a/test/integration/virtual-rules/aria-toggle-field-name.js b/test/integration/virtual-rules/aria-toggle-field-name.js index 153970cc72..584e784c65 100644 --- a/test/integration/virtual-rules/aria-toggle-field-name.js +++ b/test/integration/virtual-rules/aria-toggle-field-name.js @@ -89,7 +89,7 @@ describe('aria-toggle-field-name', function() { var node = new axe.SerialVirtualNode({ nodeName: 'div', attributes: { - role: 'menuitemcheckbox' + role: 'option' } }); node.children = [];