whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.02k stars 2.62k forks source link

Autocomplete values for input type="tel" #9086

Open wortwart opened 1 year ago

wortwart commented 1 year ago

In https://html.spec.whatwg.org/multipage/forms.html#the-difference-between-the-field-type,-the-autofill-field-name,-and-the-input-modality you show an example of using <input type="tel"> combined with autocomplete=tel-national - which seems to make sense.

Anyway, this contradicts https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute where all tel-* autocomplete values are surprisingly limited to text-like inputs which does not include type="tel". This rule is also used by the HTML validator.

Suggestion: Change the control group for all tel-* values to "Telephone" - which is what anybody would expect.

annevk commented 1 year ago

I agree with tel (already covered) and tel-national, but I'm not sure tel-country-code or the others make as much sense.

cc @whatwg/forms