Skip to content

Commit

Permalink
fix: Add combobox and radio required properties
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Aug 23, 2018
1 parent c2d290c commit e80af7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/commons/aria/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,13 @@ lookupTable.role = {
type: 'composite',
attributes: {
allowed: [
'aria-expanded',
'aria-autocomplete',
'aria-required',
'aria-activedescendant',
'aria-orientation',
'aria-errormessage'
]
],
required: ['aria-expanded']
},
owned: {
all: ['listbox', 'textbox']
Expand Down Expand Up @@ -1509,13 +1509,13 @@ lookupTable.role = {
type: 'widget',
attributes: {
allowed: [
'aria-checked',
'aria-selected',
'aria-posinset',
'aria-setsize',
'aria-required',
'aria-errormessage'
]
],
required: ['aria-checked']
},
owned: null,
nameFrom: ['author', 'contents'],
Expand Down
2 changes: 2 additions & 0 deletions test/integration/rules/aria-required-attr/required-attr.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<div role="slider" id="pass2" aria-valuenow="value" aria-valuemax="value" aria-valuemin="value">ok</div>
<div role="spinbutton" id="pass3" aria-valuenow="value" aria-valuemax="value" aria-valuemin="value">ok</div>
<div role="heading" id="pass4" aria-level="1">ok</div>
<div role="combobox" id="pass5" aria-expanded="true">ok</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>
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 @@ -2,9 +2,9 @@
"description": "aria-required-attr tests",
"rule": "aria-required-attr",
"violations": [
["#violation1"], ["#violation2"], ["#violation3"], ["#violation4"]
["#violation1"], ["#violation2"], ["#violation3"], ["#violation4"], ["#violation5"]
],
"passes": [
["#pass1"], ["#pass2"], ["#pass3"], ["#pass4"]
["#pass1"], ["#pass2"], ["#pass3"], ["#pass4"], ["#pass5"]
]
}

0 comments on commit e80af7a

Please sign in to comment.