Skip to content

Commit

Permalink
fix(aria-required-attr): aria-valuenow is no longer required for spin…
Browse files Browse the repository at this point in the history
…button (#3552)
  • Loading branch information
pschwendy committed Jul 20, 2022
1 parent e0010d9 commit a22cf56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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
6 changes: 3 additions & 3 deletions test/integration/rules/aria-required-attr/required-attr.html
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>
4 changes: 2 additions & 2 deletions test/integration/rules/aria-required-attr/required-attr.json
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"]
]
}

0 comments on commit a22cf56

Please sign in to comment.