Skip to content

Commit

Permalink
fix: Allow title on button-name (#794)
Browse files Browse the repository at this point in the history
Closes #747
Closes #765
  • Loading branch information
marcysutton authored and WilcoFiers committed Mar 28, 2018
1 parent f5afadb commit e31fe9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/rules/button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"aria-label",
"aria-labelledby",
"role-presentation",
"role-none"
"role-none",
"non-empty-title"
],
"none": [
"focusable-no-name"
Expand Down
2 changes: 2 additions & 0 deletions test/integration/rules/button-name/button-name.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
<div id="labeldiv">Button label</div>
<div id="emptydiv"></div>
<button id="combo" aria-label="Aria Name">Name</button>
<button id="buttonTitle" title="Title"></button>
<input id="inputTitle" title="Search" type="button">
2 changes: 1 addition & 1 deletion test/integration/rules/button-name/button-name.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"description": "button-name test",
"rule": "button-name",
"violations": [["#empty"], ["#val"], ["#alempty"], ["#albmissing"], ["#albempty"]],
"passes": [["#text"], ["#al"], ["#alb"], ["#combo"]]
"passes": [["#text"], ["#al"], ["#alb"], ["#combo"], ["#buttonTitle"], ["#inputTitle"]]
}

0 comments on commit e31fe9a

Please sign in to comment.