Skip to content

Commit

Permalink
fix(autocomplete): allow all 'tel-*' autocomplete values on type=tel (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
straker authored Jun 18, 2020
1 parent 403905c commit 58c8175
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/checks/forms/autocomplete-appropriate-evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ function autocompleteAppropriateEvaluate(node, options, virtualNode) {
'cc-exp': ['text', 'search', 'month'],
'street-address': ['text'], // Issue: https://github.com/dequelabs/axe-core/issues/1161
tel: ['text', 'search', 'tel'],
'tel-country-code': ['text', 'search', 'tel'],
'tel-national': ['text', 'search', 'tel'],
'tel-area-code': ['text', 'search', 'tel'],
'tel-local': ['text', 'search', 'tel'],
'tel-local-prefix': ['text', 'search', 'tel'],
'tel-local-suffix': ['text', 'search', 'tel'],
'tel-extension': ['text', 'search', 'tel'],
'cc-exp-month': number,
'cc-exp-year': number,
'transaction-amount': number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@
<input autocomplete="street-address" id="pass67" type="text" />
<input autocomplete="on" id="pass68" value="" type="url " />
<input autocomplete="off" id="pass69" value="42" type=" DateTime-Local" />

<input autocomplete="tel-country-code" id="pass70" type="tel" />
<input autocomplete="tel-national" id="pass71" type="tel" />
<input autocomplete="tel-area-code" id="pass72" type="tel" />
<input autocomplete="tel-local" id="pass73" type="tel" />
<input autocomplete="tel-local-prefix" id="pass74" type="tel" />
<input autocomplete="tel-local-suffix" id="pass75" type="tel" />
<input autocomplete="tel-extension" id="pass76" type="tel" />

<input autocomplete="street-address" id="fail6" type="file" />
<input autocomplete="bday-month" type="month" id="fail7" />
<input type="NUMBER" autocomplete="email" id="fail8" />
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
["#pass66"],
["#pass67"],
["#pass68"],
["#pass69"]
["#pass69"],
["#pass70"],
["#pass71"],
["#pass72"],
["#pass73"],
["#pass74"],
["#pass75"],
["#pass76"]
]
}

0 comments on commit 58c8175

Please sign in to comment.