Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on space-separated tokens in autocomplete attribute #1270

Closed
morganwdavis opened this issue Nov 16, 2021 · 3 comments
Closed

Error on space-separated tokens in autocomplete attribute #1270

morganwdavis opened this issue Nov 16, 2021 · 3 comments

Comments

@morganwdavis
Copy link

URL being validated or code to reproduce error:

<input required class="adx_zip large" title="Enter a valid ZIP Code" aria-label="ZIP Code" name="ship_adx" maxlength="5" placeholder="ZIP Code" type="tel" pattern="^\d{5}$" autocomplete="shipping postal-code">
Error: Bad value shipping postal-code for attribute autocomplete on element input: The autofill field name postal-code is not allowed in this context.

Example of this exact attribute and values shown here:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete

4.10.18.7 Autofill
...
Optionally, a token that is an ASCII case-insensitive match for one of the following strings:

"shipping", meaning the field is part of the shipping address or contact information
...
A token that is an ASCII case-insensitive match for one of the following autofill field names, excluding those that are inappropriate for the control:
...
"postal-code"

2.3.7 Space-separated tokens
A set of space-separated tokens is a string containing zero or more words (known as tokens) separated by one or more ASCII whitespace, where words consist of any string of one or more characters, none of which are ASCII whitespace.

@NiedziolkaMichal
Copy link
Collaborator

Provided example doesn't allow postal-code value, because type of input element is tel. According to specification, postal-code value is allowed only in textarea, select and input of types hidden, text and search. Mentioned example doesn't produce any error.

@sideshowbarker
Copy link
Contributor

@NiedziolkaMichal Should we go ahead and close this one?

@NiedziolkaMichal
Copy link
Collaborator

@sideshowbarker I think so

@sideshowbarker sideshowbarker closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants