3 ms·
> We don't just ignore the autocomplete attribute, however. In the WHATWG standard, we defined a series of new autocomplete values that developers can use to be
by jrochkind1 10y ago
> We don't just ignore the autocomplete attribute, however. In the WHATWG standard, we defined a series of new autocomplete values that developers can use to better inform the browser about what a particular field is, and we encourage developers to use those types. [2] https://html.spec.whatwg.org/multipage/forms.html#autofill https://html.spec.whatwg.org/multipage/forms.html#autofill
Okay, aside from what you think about being unable to just turn off autocomplete, those semantic tabs actually sound super useful, and i hadn't known about them.
> As an example, if you have an address input field in your CRM tool that you don't want Chrome to Autofill, you can give it semantic meaning that makes sense relative to what you're asking for: e.g. autocomplete="new-user-street-address".
Um, "new-user-street-address" does not appear in the list of recognized values from the WHATWG spec that was linked to above.
How do we find the list of values that Chrome actually recognizes and what they mean?
Am I missing it somewhere else? How does Chrome expect devs to use something completely un-doc'd?
- timdierks 10y agoYou elided the relevant sentence: > In cases where you really want to disable autofill, our suggestion at this point is to utilize the autocomplete attribute to give valid, semantic meaning to your fields. If we encounter an autocomplete attribute that we don't recognize, we won't try and fill it. They're saying that they don't autofill when they see autocomplete values which Chrome doesn't recognize, so if you don't want autofill, they suggest you just put in a description of what this field is, which won't be recognized. The functionality is the same as if you put in autocomplete="foobarbazquux", but it's better-described.
- jrochkind1 10y agoAh, thanks, I didn't do it on purpose, I was just confused. Because: > our suggestion at this point is to utilize the autocomplete attribute to give valid, semantic meaning to your fields. If we encounter an autocomplete attribute that we don't recognize, we won't try and fill it. How is a value not allowed by the spec "valid" as they say? They're encouraging you to violate the spec to trigger chrome-specific behavior (can't really say what other browsers will do when spec is violated, can you?), really? Or does the spec say you're allowed to make up new values too? i don't _think_ so, but maybe I missed that part (not being sarcastic).
- michaelmior 10y agoIt was my understanding that currently Chrome doesn't support any special behaviour for custom values of the autocomplete attribute. I think they just want to get people used to this and probably start capturing data (via web crawls) of what values people actually use to decide what to implement in the future.