#63286 closed enhancement (fixed)
User profile first name, last name, nickname and email fields should have autocomplete attributes for accessibility
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Users | Keywords: | has-patch commit |
Focuses: | ui, accessibility, administration | Cc: |
Description
The WCAG success criterion 1.3.5 (Identify Input Purpose) requires adding autocomplete attributes to allow users to autofill certain fields when providing information about themselves. In WordPress, the relevant fields that lack autocomplete attributes are the first name, last name, nickname and email fields on the User Profile page. These could be given the following attributes:
autocomplete="given-name" autocomplete="family-name" autocomplete="nickname" autocomplete="email"
Change History (16)
This ticket was mentioned in PR #8693 on WordPress/wordpress-develop by @greatislander.
2 months ago
#1
- Keywords has-patch added
@umeshsinghin commented on PR #8693:
2 months ago
#2
PR looks good with the updated autocomplete attributes in place.
#4
@
2 months ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to joedolson
- Status changed from new to accepted
This seems like a good idea, but it should only apply when a user is editing their own profile; accidentally auto-filling somebody else's details could create problems, and is unlikely to be helpful in normal usage.
#5
@
2 months ago
Agree on keeping this to only editing one's own profile. This also could be a candidate for a 6.8 minor, but I think we need to see what the change ends up looking like before getting to that
#6
@
2 months ago
It definitely should be restricted to editing one's own profile; thanks for the suggestion. That's in keeping with WCAG Technique H98 related to this success criterion which notes that "the Success Criterion Identify Input Purpose and autocomplete attribute only place requirements on input fields collecting information about the user" so this would be in keeping the desired WCAG support. I'll update the patch accordingly.
#7
@
2 months ago
Updated to check IS_PROFILE_PAGE
constant before adding autocomplete attributes. I used an inline if
statement but if you'd prefer I could use conditional blocks and output each input differently depending on whether or not IS_PROFILE_PAGE
is true.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
2 weeks ago
#9
@
2 weeks ago
PR looks good.
The proposed changes are implemented and it’s working as expected. The autocomplete
are only applied if editing the own user profile.
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
2 weeks ago
#11
@
2 weeks ago
- Keywords commit added
Thanks for testing, @lukasfritzedev! Reviewing and preparing for commit.
#13
@
2 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: REPLACE_WITH_PATCH_URL
Environment
- WordPress: 6.9-alpha-20250418.170656
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- I checked on own profile and autocomplete fields are added correctly. No autocomplete fields when editing users. It looks like the issue has been resolved.
Trac ticket: https://core.trac.wordpress.org/ticket/63286