Bug description
The user create and account forms collect a person's own name and email but set no autocomplete attribute, so browsers and assistive technology cannot identify the fields for autofill.
Measured on /cp/users/create:
name type=text autocomplete: null
email type=email autocomplete: null
The login form already does this correctly, which is what makes the omission look accidental rather than deliberate:
email autocomplete="username"
password autocomplete="current-password"
WCAG 2.1 SC 1.3.5 Identify Input Purpose (Level AA).
How to reproduce
composer create-project statamic/statamic, log in
- Visit
/cp/users/create (or /cp/account)
- In the console:
[...document.querySelectorAll('input')].map(i => [i.name || i.id, i.getAttribute('autocomplete')])
Every value is null.
Suggested fix
Two parts, and the second is the more useful one:
- Set
autocomplete="name" and autocomplete="email" on the name and email fields in the user blueprint.
- Expose an
autocomplete config key on the Text fieldtype so blueprint authors can satisfy 1.3.5 on their own front-end and CP forms. Right now there is no way to set it from a blueprint at all, which means any Statamic site collecting a user's own details in a CP form inherits this.
Filing rather than PRing because (2) is an API addition and the config key naming is yours to choose. Happy to implement whichever shape you'd prefer.
Bug description
The user create and account forms collect a person's own name and email but set no
autocompleteattribute, so browsers and assistive technology cannot identify the fields for autofill.Measured on
/cp/users/create:The login form already does this correctly, which is what makes the omission look accidental rather than deliberate:
WCAG 2.1 SC 1.3.5 Identify Input Purpose (Level AA).
How to reproduce
composer create-project statamic/statamic, log in/cp/users/create(or/cp/account)Every value is
null.Suggested fix
Two parts, and the second is the more useful one:
autocomplete="name"andautocomplete="email"on the name and email fields in the user blueprint.autocompleteconfig key on the Text fieldtype so blueprint authors can satisfy 1.3.5 on their own front-end and CP forms. Right now there is no way to set it from a blueprint at all, which means any Statamic site collecting a user's own details in a CP form inherits this.Filing rather than PRing because (2) is an API addition and the config key naming is yours to choose. Happy to implement whichever shape you'd prefer.