Page MenuHomePhabricator

Account Creation: improve password & confirm password field UX
Closed, ResolvedPublic5 Estimated Story Points

Description

User story:

As a new account creator on mobile web, I want clear and timely feedback when my password and confirm password fields don't meet requirements or don't match, so that I can quickly fix errors and complete account creation without unnecessary friction.

Background & research:

The current account creation form delays password mismatch validation until form submission and does not clear errors after the user corrects their input. This creates confusion and unnecessary friction, particularly on mobile where context-switching between fields is more error-prone. Providing validation on blur - and re-validation on subsequent edits - aligns with standard UX practices and reduces failed submissions. This task is part of the broader V3 account creation effort (T415659).

Design:

Figma designs

Acceptance Criteria:

Note on error severity: blur-triggered validation uses a warning state (yellow triangle + warning message). Submit-triggered validation escalates to an error state (red icon + error message + form-level error banner). These are distinct visual states and should be implemented accordingly.

Note on optimistic vs. conservative re-validation: AC8 and AC9 describe the ideal (optimistic) behavior. AC10 and AC11 describe the acceptable fallback (conservative). Implement optimistic if straightforward; fall back to conservative if re-validation on keystroke is non-trivial.


On blur - password field

  • AC1: Given the user leaves the password field, when the password meets all requirements, then clear any existing password warning.
    image.png (946×1,880 px, 140 KB)
  • AC2: Given the user leaves the password field, when the password does not meet requirements (e.g. fewer than 8 characters), then display an inline warning below the field.
    image.png (946×1,880 px, 143 KB)
  • AC3: Given the confirm password field is already filled and the user leaves the password field, when the password is now valid and the fields do not match, then display a mismatch warning below the confirm password field.
    image.png (946×1,880 px, 145 KB)
  • AC4: Given the confirm password field is already filled and the user leaves the password field, when the password is now valid and the fields match, then clear any existing mismatch warning.
    image.png (948×1,880 px, 137 KB)

On blur - confirm password field

  • AC5: Given the user leaves the confirm password field, when the password field is still invalid, then do not validate confirm password - suppress any match-related feedback.
    image.png (946×1,880 px, 145 KB)
  • AC6: Given the user leaves the confirm password field, when the password field is valid and the passwords do not match, then display a mismatch warning below the confirm password field.
    image.png (944×1,880 px, 144 KB)
  • AC7: Given the user leaves the confirm password field, when the password field is valid and the passwords match, then display no error.
    image.png (946×1,880 px, 138 KB)

On keystroke - optimistic re-validation (ideal)

  • AC8: Given a password field warning or error is already displayed, when the user types in the password field and the value now meets requirements, then clear the warning or error immediately without waiting for blur.
    image.png (2,704×1,880 px, 276 KB)
  • AC9: Given a mismatch warning or error is already displayed, when the user types in either field and the passwords now match, then clear the mismatch warning or error immediately.
    image.png (2,704×1,880 px, 274 KB)

On keystroke - conservative fallback (acceptable)

  • AC10: Given a password field warning or error is already displayed, when the user types in the password field, then re-validate on next blur rather than on each keystroke.
    image.png (2,704×1,880 px, 277 KB)
  • AC11: Given a mismatch warning or error is already displayed, when the user types in either field, then re-validate on next blur rather than on each keystroke.
    image.png (2,704×1,880 px, 275 KB)

On submit

  • AC12: Given the user submits the form, when the password field is invalid, then display the password requirements error inline below the password field regardless of prior field state.
    image.png (856×1,880 px, 135 KB)
  • AC13: Given the user submits the form, when the passwords do not match, then display the mismatch error inline below the confirm password field regardless of prior field state.
    image.png (856×1,880 px, 134 KB)
  • AC14: Given the user submits the form, when both the password is invalid and the passwords do not match, then display both errors simultaneously alongside a form-level error banner ("There are problems with some of your input.").
    image.png (856×1,880 px, 141 KB)
  • AC15: Given the user submits the form, when client-side validation fails due to password-related errors (invalid password or mismatched passwords), then the password and confirm password fields retain their current values so the user can reveal and edit rather than retype.

Open questions:
  • Can this be included in the V3 release?
  • Is additional instrumentation needed to track validation error rates or correction patterns?
  • Should a debounce be applied to keystroke re-validation (AC8/AC9) to avoid noisy feedback on fast typists?
  • How should password mismatch errors interact with other password errors? (stack vs. display as one error)
    • Display only one error - whatever the API returns first.

Details

Related Changes in Gerrit:

Event Timeline

KStoller-WMF moved this task from Needs Refinement to Up next Sprint on the Growth-Team board.
KStoller-WMF moved this task from Up next Sprint to Needs Refinement on the Growth-Team board.

This behavior makes a lot of sense to me, and it seems like an obvious improvement. But is this actually something that needs to be experimented with? It is going to be a moderate amount of effort, and I'd rather not try to squash this into any upcoming experiment given that we're already very tight on time.

I'm open to that. We could treat this more like a UX bug fix and make sure we work on this even if we don't manage to squeeze in a V3 experiment.

KStoller-WMF set the point value for this task to 5.May 18 2026, 4:09 PM

Change #1313164 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/core@master] CreateAccount: improve password UX

https://gerrit.wikimedia.org/r/1313164

Test wiki created on Patch demo by MGrosse-WMF using patch(es) linked to this task:
https://ddb45c9f1a.catalyst.wmcloud.org/w/

I created a PatchDemo with my current work, you can try it out here: https://253265fb7f.catalyst.wmcloud.org/w/index.php?title=Special:CreateAccount

Many AC worked already out-of-the box, and I made the confirm password field now work as well.

However, AC 5 is not met!

AC5: Given the user leaves the confirm password field, when the password field is still invalid, then do not validate confirm password - suppress any match-related feedback.

@AAlhazwani-WMF, @KStoller-WMF: That would be substantial additional effort to get right. Could we consider dropping this AC?

The main context is that the password is checked via an API request. So to decide whether we can show the confirm password warning, we would not only have to check whether there is an error on the password field, but also whether there is a validation request for that field in flight that we have to wait for. This would be pretty simple with a reactive framework like Vue and Pinia, but that is not what we're working with here.

Another note: The username field, password field, and confirm password field all have the fundamentally same logic for when to validate: On blur, and after a 2000ms delay after the last keystroke (debounce). That comes from T419401. The delay is configurable per field and I've set it to 0 for the confirm-password field.

Test wiki created on Patch demo by MGrosse-WMF using patch(es) linked to this task:
https://253265fb7f.catalyst.wmcloud.org/w/

Test wiki on Patch demo by MGrosse-WMF using patch(es) linked to this task was deleted:

https://ddb45c9f1a.catalyst.wmcloud.org/w/

On blur - password field

  • AC1: Given the user leaves the password field, when the password meets all requirements, then clear any existing password warning.
    image.png (946×1,880 px, 140 KB)

works!

Screenshot_1784708361.png (1,280×2,856 px, 285 KB)
Screenshot_1784708371.png (1,280×2,856 px, 285 KB)


  • AC2: Given the user leaves the password field, when the password does not meet requirements (e.g. fewer than 8 characters), then display an inline warning below the field. >
    image.png (946×1,880 px, 143 KB)

works!

Screenshot_1784708361.png (1,280×2,856 px, 285 KB)


  • AC3: Given the confirm password field is already filled and the user leaves the password field, when the password is now valid and the fields do not match, then display a mismatch warning below the confirm password field.
    image.png (946×1,880 px, 145 KB)

works!

Screenshot_1784708527.png (1,280×2,856 px, 295 KB)


  • AC4: Given the confirm password field is already filled and the user leaves the password field, when the password is now valid and the fields match, then clear any existing mismatch warning.
    image.png (948×1,880 px, 137 KB)

works!

Screenshot_1784708566.png (1,280×2,856 px, 292 KB)


On blur - confirm password field

  • AC5: Given the user leaves the confirm password field, when the password field is still invalid, then do not validate confirm password - suppress any match-related feedback.
    image.png (946×1,880 px, 145 KB)

happy to skip this per comment above.


  • AC6: Given the user leaves the confirm password field, when the password field is valid and the passwords do not match, then display a mismatch warning below the confirm password field.
    image.png (944×1,880 px, 144 KB)

works!

Screenshot_1784708527.png (1,280×2,856 px, 295 KB)


  • AC7: Given the user leaves the confirm password field, when the password field is valid and the passwords match, then display no error.
    image.png (946×1,880 px, 138 KB)

works!

Screenshot_1784708566.png (1,280×2,856 px, 292 KB)


On keystroke - optimistic re-validation (ideal)

  • AC8: Given a password field warning or error is already displayed, when the user types in the password field and the value now meets requirements, then clear the warning or error immediately without waiting for blur.
    image.png (2,704×1,880 px, 276 KB)

works-ish. after a 2000ms timout.

Screenshot_1784709274.png (1,280×2,856 px, 308 KB)


  • AC9: Given a mismatch warning or error is already displayed, when the user types in either field and the passwords now match, then clear the mismatch warning or error immediately.
    image.png (2,704×1,880 px, 274 KB)

works, with a caveat below.

Screenshot_1784709055.png (1,280×2,856 px, 311 KB)


On keystroke - conservative fallback (acceptable)

  • AC10: Given a password field warning or error is already displayed, when the user types in the password field, then re-validate on next blur rather than on each keystroke.
    image.png (2,704×1,880 px, 277 KB)

works!


  • AC11: Given a mismatch warning or error is already displayed, when the user types in either field, then re-validate on next blur rather than on each keystroke.
    image.png (2,704×1,880 px, 275 KB)

works, with a caveat below.


On submit

  • AC12: Given the user submits the form, when the password field is invalid, then display the password requirements error inline below the password field regardless of prior field state.
    image.png (856×1,880 px, 135 KB)

works!

Screenshot_1784709358.png (1,280×2,856 px, 308 KB)


  • AC13: Given the user submits the form, when the passwords do not match, then display the mismatch error inline below the confirm password field regardless of prior field state.
    image.png (856×1,880 px, 134 KB)

works!

Screenshot_1784709304.png (1,280×2,856 px, 308 KB)


  • AC14: Given the user submits the form, when both the password is invalid and the passwords do not match, then display both errors simultaneously alongside a form-level error banner ("There are problems with some of your input.").
    image.png (856×1,880 px, 141 KB)

the banner is missing. but given that the form scrolls up automatically to the first field with an error we can leave this AC out.


  • AC15: Given the user submits the form, when client-side validation fails due to password-related errors (invalid password or mismatched passwords), then the password and confirm password fields retain their current values so the user can reveal and edit rather than retype.

works!


the caveat. setting the confirm password validation delay to 0 triggers the warning as soon as people start typing which is jarring. we could keep the default 2000ms.


some extra things:

  1. when there is an error that displays on submit, like password too short, when fixing the error on blur/timout the field stays red
    Screenshot_1784709839.png (1,280×2,856 px, 286 KB)
  2. on submit, if the password or confirm password field are empty we should a system-level warning instead of our own
    Screenshot_1784710014.png (1,280×2,856 px, 335 KB)

some extra things:

  1. when there is an error that displays on submit, like password too short, when fixing the error on blur/timout the field stays red
    Screenshot_1784709839.png (1,280×2,856 px, 286 KB)

Curently, on beta, the red field will change on focus, i.e. when a user clicks in the field.

  1. on submit, if the password or confirm password field are empty we should a system-level warning instead of our own
    Screenshot_1784710014.png (1,280×2,856 px, 335 KB)

The message - MediaWiki:Captcha-createaccount "To protect the wiki against automated account creation, we kindly ask you to solve the following task below and enter the answer in the box (more info):" (Extension:ConfirmEdit).
Not sure how it collaborates with hCaptcha.

Change #1313164 merged by jenkins-bot:

[mediawiki/core@master] CreateAccount: improve password UX

https://gerrit.wikimedia.org/r/1313164

Test wiki on Patch demo by MGrosse-WMF using patch(es) linked to this task was deleted:

https://253265fb7f.catalyst.wmcloud.org/w/

Checked on enwiki wmf.15

Since the following issue is codex-related, so it's outside of the scope of this task.
The icon element (<span class="cdx-text-input__icon cdx-text-input__end-icon mw-password-reveal-icon"></span>) is displayed as active (the black, non-dimmed color) only when a user focus is on the field .

The Figma design and the screenshots in the task will display mw-password-reveal-icon as active (non-dimmed) in two cases

  • a user focus is in the field with the eye icon (the current behavior)
  • a user clicks on the eye icon to reveal the password, then the active eye icon status persists even when a user moves to a another field

Compare

Figma designenwiki wmf.15
The password reveal icon is displayed as active in the field where a users clicks to reveal it and in the field where a user has the current focus
Screenshot 2026-08-17 at 10.13.43 AM.png (734×1,564 px, 223 KB)
1) the Password field - revealed; the Confirm password field - not revealed. No focus in either field - the icon is dimmed for both fields
Screenshot 2026-08-17 at 10.33.44 AM.png (1,360×1,490 px, 182 KB)
2) the Password field revealed, no focus - the icon is dimmed; the Confirm password non revealed; focus is in the field - the icon is active.
Screenshot 2026-08-17 at 10.40.04 AM.png (1,294×1,420 px, 164 KB)