From cb51be4e3ed69e8e8b3725cab5ad1a4671f64c0c Mon Sep 17 00:00:00 2001 From: Mikey Binns <38146638+mikeybinns@users.noreply.github.com> Date: Mon, 22 May 2023 16:36:05 +0100 Subject: [PATCH] fix(aria-allowed-attr): Add 'aria-required' to switch role (#4029) Related: #4027 --- lib/standards/aria-roles.js | 2 +- test/integration/rules/aria-allowed-attr/passes.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/standards/aria-roles.js b/lib/standards/aria-roles.js index 09d1b012b4..c49c6b3f4a 100644 --- a/lib/standards/aria-roles.js +++ b/lib/standards/aria-roles.js @@ -686,7 +686,7 @@ const ariaRoles = { switch: { type: 'widget', requiredAttrs: ['aria-checked'], - allowedAttrs: ['aria-readonly'], + allowedAttrs: ['aria-readonly', 'aria-required'], superclassRole: ['checkbox'], accessibleNameRequired: true, nameFromContent: true, diff --git a/test/integration/rules/aria-allowed-attr/passes.html b/test/integration/rules/aria-allowed-attr/passes.html index 61c0d3f069..702a41e5fe 100644 --- a/test/integration/rules/aria-allowed-attr/passes.html +++ b/test/integration/rules/aria-allowed-attr/passes.html @@ -1922,6 +1922,7 @@ aria-live="value" aria-owns="value" aria-relevant="value" + aria-required="value" > ok