Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#54538 closed defect (bug) (fixed)

Reset Password form: Generate Password contains aria-expanded

Reported by: alexstine's profile alexstine Owned by: alexstine's profile 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 2 years ago.
54538-2.diff (1.5 KB) - added by alexstine 2 years ago.

Download all attachments as: .zip

Change History (11)

#1 @alexstine
2 years ago

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

@alexstine
2 years ago

#2 @alexstine
2 years 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.


2 years ago

#4 @alexstine
2 years ago

  • Focuses multisite removed

@alexstine
2 years ago

#5 @alexstine
2 years 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
2 years ago

  • Keywords commit dev-reviewed added

Looks good to me. 👍

#7 in reply to: ↑ 6 @alexstine
2 years ago

Replying to johnjamesjacoby:

Looks good to me. 👍

@johnjamesjacoby Thanks for the quick review. :)

#8 @sabernhardt
2 years ago

  • Version changed from trunk to 5.7

introduced in r50153

#9 @davidbaumwald
2 years 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.