Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aria-allowed-role): add gridcell, separator, slider and treeitem to allowed roles of button element #4398

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/standards/html-elms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ <h1 id="pass-h1-valid-role" role="none"></h1>
></div>
<div id="pass-graphics-object" role="graphics-object"></div>
<div id="pass-graphics-symbol" role="graphics-symbol"></div>
<button
id="pass-button-role-gridcell"
role="gridcell"
title="IconCheckmark"
aria-label="IconCheckmark icon"
></button>

<dd id="fail-dd-no-role" role="link"></dd>
<dt id="fail-dt-no-role" role="banner"></dt>
Expand All @@ -219,12 +225,7 @@ <h1 id="pass-h1-valid-role" role="none"></h1>
<button id="fail-button-role-cell" role="cell"></button>
<aside id="fail-aside-doc-foreword" role="doc-foreword"></aside>
<aside id="fail-aside-role-tab" role="tab"></aside>
<button
id="fail-button-role-gridcell"
role="gridcell"
title="IconCheckmark"
aria-label="IconCheckmark icon"
></button>

<input id="fail-input-role-gridcell-multiple-role" role="gridcell combobox" />
<div style="display: none">
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
["#pass-imgmap-2"],
["#pass-navnone-1"],
["#pass-navnone-2"],
["#pass-search-elm"]
["#pass-search-elm"],
["#pass-button-role-gridcell"]
],
"violations": [
["#fail-dd-no-role"],
Expand All @@ -102,7 +103,6 @@
["#fail-button-role-cell"],
["#fail-aside-doc-foreword"],
["#fail-aside-role-tab"],
["#fail-button-role-gridcell"],
["#fail-input-role-gridcell-multiple-role"],
["#fail-dpub-1"],
["#fail-dpub-2"],
Expand Down
Loading