Skip to content

Commit 27fce9d

Browse files
authored
fix: autocomplete street address (#1217)
1 parent a9e0dff commit 27fce9d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

lib/checks/forms/autocomplete-appropriate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const allowedTypesMap = {
99
bday: ['text', 'search', 'date'],
1010
email: ['text', 'search', 'email'],
1111
'cc-exp': ['text', 'search', 'month'],
12-
'street-address': [], // Not even the default
12+
'street-address': ['text'], // Issue: https://github.com/dequelabs/axe-core/issues/1161
1313
tel: ['text', 'search', 'tel'],
1414
'cc-exp-month': number,
1515
'cc-exp-year': number,

test/integration/rules/autocomplete-valid/autocomplete-valid.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,5 @@
118118
<input autocomplete="off" id="pass64" name="input_1" placeholder="Numeric Input Field" value="42" type="tel">
119119
<input autocomplete="on" id="pass65" value="" type="url">
120120
<input autocomplete="off" id="pass66" value="42" type="datetime-local">
121-
121+
<input autocomplete="street-address" id="pass67" type="text" />
122+
<input autocomplete="street-address" id="fail6" type="file" />

test/integration/rules/autocomplete-valid/autocomplete-valid.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
["#fail2"],
77
["#fail3"],
88
["#fail4"],
9-
["#fail5"]
9+
["#fail5"],
10+
["#fail6"]
1011
],
1112
"passes": [
1213
["#pass1"],
@@ -74,6 +75,7 @@
7475
["#pass63"],
7576
["#pass64"],
7677
["#pass65"],
77-
["#pass66"]
78+
["#pass66"],
79+
["#pass67"]
7880
]
7981
}

0 commit comments

Comments
 (0)