From 4788bf8d6fd963d7b017dad950b122ffcea8d151 Mon Sep 17 00:00:00 2001 From: Michael Sereniti <31261408+msereniti@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:40:01 +0200 Subject: [PATCH] fix(aria-allowed-role): add gridcell, separator, slider and treeitem to allowed roles of button element (#4398) Closes: https://github.com/dequelabs/axe-core/issues/4397 --- lib/standards/html-elms.js | 6 +++++- .../rules/aria-allowed-role/aria-allowed-role.html | 13 +++++++------ .../rules/aria-allowed-role/aria-allowed-role.json | 4 ++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/standards/html-elms.js b/lib/standards/html-elms.js index ce773e111c..d96ab34b5e 100644 --- a/lib/standards/html-elms.js +++ b/lib/standards/html-elms.js @@ -140,14 +140,18 @@ const htmlElms = { allowedRoles: [ 'checkbox', 'combobox', + 'gridcell', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', + 'separator', + 'slider', 'switch', - 'tab' + 'tab', + 'treeitem' ], // 5.4 button Element namingMethods: ['subtreeText'] diff --git a/test/integration/rules/aria-allowed-role/aria-allowed-role.html b/test/integration/rules/aria-allowed-role/aria-allowed-role.html index 3a2b99efad..80a9223492 100644 --- a/test/integration/rules/aria-allowed-role/aria-allowed-role.html +++ b/test/integration/rules/aria-allowed-role/aria-allowed-role.html @@ -207,6 +207,12 @@
> + @@ -219,12 +225,7 @@ - +