Opened 16 months ago
Last modified 2 weeks ago
#60726 accepted defect (bug)
The WordPress core password reset needs to pre-populate the username to meet WCAG 2.2
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | has-patch changes-requested |
Focuses: | ui, accessibility | Cc: |
Description (last modified by )
According to new WCAG 2.2 success criterion for 3.3.7 redundant entry.
The criterion establishes that information previously entered by or provided to the user that is required to be entered again the same process is either:
- auto-populated, or
- available for the user to select
There are 3 exceptions:
- re-entering the information is essential,
- the information is required to ensure the security of the content, or
- previously entered information is no longer valid.
Once the user has performed the process of requesting a new password, the redirected form should have the username filled-in to pass. As of now, this is the form that the user is redirected to:
Attachments (1)
Change History (32)
This ticket was mentioned in Slack in #design by estelaris. View the logs.
16 months ago
#2
@
16 months ago
- Component changed from General to Login and Registration
- Keywords needs-patch added; needs-design removed
- Milestone changed from Awaiting Review to 6.6
- Summary changed from The WordPress core password reset doesn't comply with new WCAG 2.2 success criterion to The WordPress core password reset needs to pre-populated the username to meet WCAG 2.2
#4
@
16 months ago
- Summary changed from The WordPress core password reset needs to pre-populated the username to meet WCAG 2.2 to The WordPress core password reset needs to pre-populate the username to meet WCAG 2.2
This ticket was mentioned in PR #6332 on WordPress/wordpress-develop by rishavjeet.
15 months ago
#7
- Keywords has-patch added; needs-patch removed
This PR mainly focuses upon the new feature of pre-populating the username field in the login form after password reset to meet WCAG 2.2 for accessibility.
For this feature, a new query parameter has been added to the password reset link that is sent to the email , so that after password reset the username field can be pre-field on the basis of the query parameter value user=
Screen-recording for demo
https://github.com/WordPress/wordpress-develop/assets/96969845/ed068467-12b0-4a3a-a042-aedc45dc5f77
Trac ticket: https://core.trac.wordpress.org/ticket/60726
Contributor name - Rishav Dutta
---
#8
@
13 months ago
I assume this should cover all possible cases, when there is a need to enter:
- Login after installation
- Login after restoring password
- Login after unsuccessful Login ✅
- Restoring password after unsuccessful Login if login is correct (we are providing this information, so, there is no secret that this user exists).
For me the empty field in the last case is really annoying, because you didn't manage to enter into the admin, most likely you tried several times, and now what you want to enter should be obvious. You can make a mistake in the username, but most likely you forgot the password.
What do you think?
#9
@
13 months ago
Yes, I'd agree that those are the cases that need to be covered. I assume the green check mark indicates that the current PR already meets that case?
This ticket was mentioned in Slack in #accessibility by rcreators. View the logs.
13 months ago
#11
@
13 months ago
- Keywords changes-requested added
Looks like there is still more work to do in this patch. I will create a new PR for this one to complete it this week. Else we will push it to 6.7.
This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.
12 months ago
This ticket was mentioned in PR #6928 on WordPress/wordpress-develop by @rishavdutta.
12 months ago
#14
This PR mainly focuses upon the new feature of pre-populating the username field in the login form after password reset to meet WCAG 2.2 for accessibility.
For this feature, a new query parameter has been added to the password reset link that is sent to the email , so that after password reset the username field can be pre-field on the basis of the query parameter value user=
Screen-recording for demo
https://github.com/WordPress/wordpress-develop/assets/96969845/ed068467-12b0-4a3a-a042-aedc45dc5f77
Trac ticket: https://core.trac.wordpress.org/ticket/60726
Contributor name - Rishav Dutta
---
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
11 months ago
@peterwilsoncc commented on PR #6928:
11 months ago
#16
This PR is duplicating a number of existing parameters that are passed around containing the user's login name. Unfortunately they use a variety of names: login
, log
and user_login
. user_email
is also used during registration.
Rather than create an additional parameter user
, it would be good to reuse the existing parameters.
When a user resets their password, the link they are emailed contains both their username and the reset key. These are subsequently set to a session cookie and a redirect takes place to remove the data from the URL. This is to prevent a user from bookmarking data containing their username and reset code.
I think it would be beneficial to use a similar pattern for passing around the username in the improved flow removing the need to re-enter data. As part of the registration and password reset flows the goal is to prevent users from needing to reenter their username, however I don't think it wise to allow users to create a bookmark containing their username as it could lead to issues on shared computers.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
11 months ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
9 months ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
9 months ago
This ticket was mentioned in Slack in #core by chaion07. View the logs.
9 months ago
#21
@
9 months ago
Thanks @estelaris for reporting this Ticket. We reviewed this Ticket during a recent bug-scrub session. Based on the feedback received we want to note that the The changes requested are not addressed yet. We would like for the changes to be addressed and possibly revisit the Ticket before Beta is over to maintain consistency with the milestone in the Ticket.
Thank you.
Props to @pratiklondhe
Cheers!
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
9 months ago
This ticket was mentioned in Slack in #core by stoyangeorgiev. View the logs.
8 months ago
#24
@
8 months ago
- Milestone changed from 6.7 to 6.8
This one was discussed at a bug-scrub and with Beta 3 in a few hours and requested changes not applied, will move this one to 6.8.
This ticket was mentioned in PR #8122 on WordPress/wordpress-develop by @rinkalpagdar.
5 months ago
#25
Trac ticket: https://core.trac.wordpress.org/ticket/60726
This PR prepopulate the username into the login form after the password reset using the existing query parameter.
@pratiklondhe commented on PR #8122:
5 months ago
#26
I've tested the above patch locally, and it seems to be working as expected. The username is pre-populated when the user resets their password and navigates to the login page afterward.
@peterwilsoncc commented on PR #8122:
5 months ago
#27
Please see my note on the original PR implimenting this change, it duplicates the issues discussed there.
https://github.com/WordPress/wordpress-develop/pull/6928#issuecomment-2276955008
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
4 months ago
#29
@
3 months ago
- Milestone changed from 6.8 to 6.9
Not going to get this done for 6.8; moving to 6.9.
#30
@
2 weeks ago
I discussed this issue briefly with @joedolson on the contributor day. He suggested there is another case that should be taken into consideration: The user tries to login on one device, i.e. a desktop PC, but opens the email and completes the resetting flow on another device, i.e. a smartphone. In this case the user might want to login on the desktop PC afterwards. So I'd assume, the cases listed by @oglekler in #comment:8 should be supplemented by this case:
- Login after requesting new password
Case 3. (Login after unsuccessful Login) was marked with a checkmark (✅). I assume this is, because it is already implemented in core.
#31
@
2 weeks ago
Main requirements of implementation:
- auto-populating the input
user_login
of the login form - preventing a user from bookmarking data containing their username (as mentioned in #comment:16)
How to implement this:
Case 2. (Login after password reset) and case 5. (Login after requesting new password) could be implemented using a session cookie that stores just the login name (as suggested by @peterwilsoncc in #comment:16). As mentioned in #comment:8 the information that a user exists is not secret, so the username can be set as a cookie. I think there is no need for a redirect in these cases since the username is not encoded in the query parameters of the URLs at this point.
The cookie should be removed, after the login is successful. As default expiration I’d suggest 0
, as it is done for the wp-resetpass-*
cookie.
@joedolson suggested to use transients during the short discussion on contributor day. After checking the flows and considering the non-secret nature of the username, I think this is not necessary in these cases. I’m happy to reconsider this. Have I overlooked something?
I think, the same approach can be used for case 1. (Login after installation) and case 4. (Restoring password after unsuccessful Login)
Updating the ticket title to make it more clear what the needed change is for this.
Also removing needs design, as there's no visual change required; it just needs to populate the field, as far as I can tell.