WordPress.org

Make WordPress Core

Opened 8 weeks ago

Closed 3 weeks ago

#54538 closed defect (bug) (fixed)

Reset Password form: Generate Password contains aria-expanded

Reported by: alexstine Owned by: alexstine
Milestone: 6.0 Priority: normal
Severity: normal Version: 5.7
Component: Login and Registration Keywords: has-patch needs-testing commit dev-reviewed
Focuses: accessibility Cc:

Description

Steps to reproduce:

  1. Go to domain.com/wp-admin.
  2. Select Lost your Password.
  3. Enter username/email.
  4. Select Get New Password.
  5. Click the confirmation link in your email.
  6. Notice how the Generate Password button contains
    aria-expanded="true"
    

. This button simply regenerates the password, it does not expand/collapse anything.

To fix:
Remove the aria-expanded attribute.

Attachments (2)

54538-1.diff (1.2 KB) - added by alexstine 8 weeks ago.
54538-2.diff (1.5 KB) - added by alexstine 8 weeks ago.

Download all attachments as: .zip

Change History (11)

#1 @alexstine
8 weeks ago

  • Owner set to alexstine
  • Status changed from new to accepted

@alexstine
8 weeks ago

#2 @alexstine
8 weeks ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 6.0
  • Version set to trunk

Added a fix.

  • Added a class called "skip-aria-expanded".
  • Added an exclusion for the above class in jQuery.
  • Removed aria-expanded from the button.

This is ready for testing.

This ticket was mentioned in Slack in #accessibility by alexstine. View the logs.


8 weeks ago

#4 @alexstine
8 weeks ago

  • Focuses multisite removed

@alexstine
8 weeks ago

#5 @alexstine
8 weeks ago

Latest patch fixes a bug on the Profile/Edit User page which causes the "Set New Password" button to keep aria-expanded even after selecting "Cancel Password Change".

#6 follow-up: @johnjamesjacoby
8 weeks ago

  • Keywords commit dev-reviewed added

Looks good to me. 👍

#7 in reply to: ↑ 6 @alexstine
7 weeks ago

Replying to johnjamesjacoby:

Looks good to me. 👍

@johnjamesjacoby Thanks for the quick review. :)

#8 @sabernhardt
3 weeks ago

  • Version changed from trunk to 5.7

introduced in r50153

#9 @davidbaumwald
3 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 52450:

Login and Registration: Remove aria-expanded from "Generate Password" button.

During password resets, the 'Generate Password" button has a aria-expanded="true" attribute, but the button itself does not expand or collapse anything. This change adds a skip-aria-expanded class to the button which is referenced in JavaScript to skip updating the aria-expanded attribute on the button itself when clicked.

This change also resets the aria-expanded attribute to false for the parent form after it's submitted.

Props alexstine, johnjamesjacoby, sabernhardt.
Fixes #54538.

Note: See TracTickets for help on using tickets.