From a22cf564be1f3e73fc21bff59ba895d34755f889 Mon Sep 17 00:00:00 2001 From: Peter Schwendeman <74508239+pschwendy@users.noreply.github.com> Date: Wed, 20 Jul 2022 13:32:51 -0400 Subject: [PATCH] fix(aria-required-attr): aria-valuenow is no longer required for spinbutton (#3552) --- lib/standards/aria-roles.js | 6 +++--- .../integration/rules/aria-required-attr/required-attr.html | 6 +++--- .../integration/rules/aria-required-attr/required-attr.json | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/standards/aria-roles.js b/lib/standards/aria-roles.js index f1291d37f0..f2f76fff3c 100644 --- a/lib/standards/aria-roles.js +++ b/lib/standards/aria-roles.js @@ -636,9 +636,8 @@ const ariaRoles = { }, spinbutton: { type: 'widget', - requiredAttrs: ['aria-valuenow'], // Note: since the spinbutton role has implicit - // aria-orientation, aria-valuemax, aria-valuemin values it + // aria-valuenow, aria-valuemax, aria-valuemin values it // is not required to be added by the user allowedAttrs: [ 'aria-valuemax', @@ -646,7 +645,8 @@ const ariaRoles = { 'aria-readonly', 'aria-required', 'aria-activedescendant', - 'aria-valuetext' + 'aria-valuetext', + 'aria-valuenow' ], superclassRole: ['composite', 'input', 'range'], accessibleNameRequired: true diff --git a/test/integration/rules/aria-required-attr/required-attr.html b/test/integration/rules/aria-required-attr/required-attr.html index 12d699b34b..e86489bb75 100644 --- a/test/integration/rules/aria-required-attr/required-attr.html +++ b/test/integration/rules/aria-required-attr/required-attr.html @@ -49,9 +49,9 @@ I am GREEN! +
fail
fail
fail
-
fail
-
fail
-
fail
+
fail
+
fail
diff --git a/test/integration/rules/aria-required-attr/required-attr.json b/test/integration/rules/aria-required-attr/required-attr.json index bf44895d68..8db6d97316 100644 --- a/test/integration/rules/aria-required-attr/required-attr.json +++ b/test/integration/rules/aria-required-attr/required-attr.json @@ -5,8 +5,7 @@ ["#violation1"], ["#violation2"], ["#violation3"], - ["#violation4"], - ["#violation5"] + ["#violation4"] ], "passes": [ ["#pass1"], @@ -19,6 +18,7 @@ ["#pass8"], ["#pass9"], ["#pass10"], + ["#pass11"], ["#comboboxWithOwns"] ] }