cenw-wscoe / WCAG-in-Plain-Language

A simple "Go To" for web developers & accessibility assessors.
https://cenw-wscoe.github.io/WCAG-in-Plain-Language/index-en.html
5 stars 2 forks source link

Update "Is the use of autocomplete="" obligatory on input fields?" #8

Open MaximPerry opened 3 years ago

MaximPerry commented 3 years ago

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

Jefferydo commented 2 years ago

See also the HTML 5 spec: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill

It frames the "on"/"off" attribute values and the token values as different "mantles", or ways the attribute is used (missing from the MDN article). The specs implies a hybrid form may not work, e.g., a form element with autocomplete="on" and some child input elements specifying a token and field name values. We could test.

Update: According to this blog post on autocomplete, "[Y]ou’re either using on and off values OR you’re using autofill field names. You can’t use them at the same time."

The a11y course has a page on autocomplete, but it needs to be updated with advice re. the "on"/"off" approach: Identifying input . We could copy that form for the test.

re "obligatory on input fields" ...

Important to point out that when using tokens: