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-required-attr): make aria-valuenow optional for spinbutton #3552

Merged
merged 1 commit into from
Jul 20, 2022
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: 3 additions & 3 deletions lib/standards/aria-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,17 +636,17 @@ 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',
'aria-valuemin',
'aria-readonly',
'aria-required',
'aria-activedescendant',
'aria-valuetext'
'aria-valuetext',
'aria-valuenow'
],
superclassRole: ['composite', 'input', 'range'],
accessibleNameRequired: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
<span role="radio" id="pass8" aria-checked="true">I am GREEN!</span>
<input type="number" role="spinbutton" id="pass9" value="10" />
<input type="number" role="spinbutton" id="pass10" />
<div role="spinbutton" id="pass11">fail</div>

<div role="scrollbar" id="violation1">fail</div>
<div role="slider" id="violation2">fail</div>
<div role="spinbutton" id="violation3">fail</div>
<div role="heading" id="violation4">fail</div>
<div role="combobox" id="violation5">fail</div>
<div role="heading" id="violation3">fail</div>
<div role="combobox" id="violation4">fail</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
["#violation1"],
["#violation2"],
["#violation3"],
["#violation4"],
["#violation5"]
["#violation4"]
],
"passes": [
["#pass1"],
Expand All @@ -19,6 +18,7 @@
["#pass8"],
["#pass9"],
["#pass10"],
["#pass11"],
["#comboboxWithOwns"]
]
}