Description
Problem
Passwords seem to autofill on forms using autofill=off.
We were using the following HTML in an admin area where an admin user needs to create new users. We don't want the current user's email/password auto filling.
<input type="password" class="tbxforms-input tbxforms-input--text" name="password" id="password" value="" autocomplete="off">
The above appeared to autofill username & password on Windows Edge.
Solution
It would be valuable to have some clear patterns we can re-use for things like login, sign up forms. I appreciate we need to test these and see how reliably they work.
If the team come up with patterns for this, should we add this to https://amplify.studio24.net/amplify/fundamentals/forms.html
Or have separate pages for this sort of thing?
References
Re: https://amplify.studio24.net/amplify/fundamentals/forms.html
Use autocapitalize="none", autocorrect="off" and spellcheck="false" to stop browsers automatically changing user input on fields that expect grammatically incorrect data, such as email addresses and passwords.
I think the attribute is supposed to be autocomplete, not autocorrect.
https://caniuse.com/?search=autocomplete reports patchy support for autocomplete=off
GOVUK notes:
Many browsers will autofill password inputs, even when the autocomplete attribute is missing or set to off.
https://design-system.service.gov.uk/components/password-input/