From 27fce9d237d26b0afd0cfda6b2394f3e0453b4aa Mon Sep 17 00:00:00 2001 From: Jey Date: Tue, 6 Nov 2018 15:18:24 +0000 Subject: [PATCH] fix: autocomplete street address (#1217) --- lib/checks/forms/autocomplete-appropriate.js | 2 +- .../rules/autocomplete-valid/autocomplete-valid.html | 3 ++- .../rules/autocomplete-valid/autocomplete-valid.json | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/checks/forms/autocomplete-appropriate.js b/lib/checks/forms/autocomplete-appropriate.js index 43358f0b42..610c5f0d32 100644 --- a/lib/checks/forms/autocomplete-appropriate.js +++ b/lib/checks/forms/autocomplete-appropriate.js @@ -9,7 +9,7 @@ const allowedTypesMap = { bday: ['text', 'search', 'date'], email: ['text', 'search', 'email'], 'cc-exp': ['text', 'search', 'month'], - 'street-address': [], // Not even the default + 'street-address': ['text'], // Issue: https://github.com/dequelabs/axe-core/issues/1161 tel: ['text', 'search', 'tel'], 'cc-exp-month': number, 'cc-exp-year': number, diff --git a/test/integration/rules/autocomplete-valid/autocomplete-valid.html b/test/integration/rules/autocomplete-valid/autocomplete-valid.html index 3168a36246..a43350e01d 100644 --- a/test/integration/rules/autocomplete-valid/autocomplete-valid.html +++ b/test/integration/rules/autocomplete-valid/autocomplete-valid.html @@ -118,4 +118,5 @@ - + + diff --git a/test/integration/rules/autocomplete-valid/autocomplete-valid.json b/test/integration/rules/autocomplete-valid/autocomplete-valid.json index 7f3867a27b..f705fa5fcc 100644 --- a/test/integration/rules/autocomplete-valid/autocomplete-valid.json +++ b/test/integration/rules/autocomplete-valid/autocomplete-valid.json @@ -6,7 +6,8 @@ ["#fail2"], ["#fail3"], ["#fail4"], - ["#fail5"] + ["#fail5"], + ["#fail6"] ], "passes": [ ["#pass1"], @@ -74,6 +75,7 @@ ["#pass63"], ["#pass64"], ["#pass65"], - ["#pass66"] + ["#pass66"], + ["#pass67"] ] }