Skip to content

[6.x] Add autocomplete defaults to the user blueprint's name and email fields - #15423

Open
duncanmcclean wants to merge 1 commit into
6.xfrom
user-autocomplete
Open

[6.x] Add autocomplete defaults to the user blueprint's name and email fields#15423
duncanmcclean wants to merge 1 commit into
6.xfrom
user-autocomplete

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Sep 8, 2026

Copy link
Copy Markdown
Member

This pull request fixes an issue where the user create and account forms in the Control Panel set no autocomplete attribute on the name and email fields, so browsers and assistive technology can't identify them for autofill (WCAG 2.1 SC 1.3.5).

This was happening because the default user blueprint never sets the Text fieldtype's autocomplete option, even though the option has existed since #8623 and is passed through to the input.

This PR fixes it by giving the email field an autocomplete: email default via the existing ensureField() call in UserRepository::blueprint(), the same route that already gives every site's email field its input_type. Blueprint-defined config still wins, so an explicit autocomplete: off is respected. The fallback blueprint used when no user.yaml exists also gets autocomplete: name on the name field.

Since {{ user:register_form }} and {{ user:profile_form }} render the same blueprint, front-end forms pick up the attribute too.

The name field isn't ensured by the CMS (blueprints may use first_name/last_name instead), so existing sites will want autocomplete: name added to their own user.yaml. The starter kit's blueprint should get the same.

Fixes #15408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User and account forms set no autocomplete attributes

1 participant