WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 7 weeks ago

#54483 accepted defect (bug)

On logout input fields have aria described login_error

Reported by: patrickgroot Owned by: alexstine
Milestone: 6.0 Priority: normal
Severity: trivial Version: 5.8.2
Component: Login and Registration Keywords: needs-patch
Focuses: ui, accessibility Cc:

Description

Hi Team,

Currently i'm trying to smooth out the UI a bit while developing a plugin that add some extra functionality to the login and registration pages of WordPress.

One thing i noticed is while you're logged-in into your WordPress site is that when you're logging out the input fields from the login form have a aria-describedby="login_error" what doesn't make sense when you're just logged-out.

URL for testing: mydomain.com/wp-login.php?loggedout=true

Change History (4)

#1 @patrickgroot
2 months ago

Potential/proposal fix

Original file: wp-login.php

<?php
if ( $errors->has_errors() ) {
    $aria_describedby_error = ' aria-describedby="login_error"';
} else {
    $aria_describedby_error = '';
}

Changed line 1370:

<?php
if ( $errors->has_errors() && empty( $_GET['loggedout'] ) ) {
    $aria_describedby_error = ' aria-describedby="login_error"';
} else {
    $aria_describedby_error = '';
}
Last edited 2 months ago by patrickgroot (previous) (diff)

This ticket was mentioned in PR #1926 on WordPress/wordpress-develop by pgroot91.


2 months ago

  • Keywords has-patch added

Adds an extra check preventing the input fields from having an aria described of login_errors while you just loggedout of your website.

Trac ticket: 54483

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


7 weeks ago

#4 @alexstine
7 weeks ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from Awaiting Review to 6.0
  • Owner set to alexstine
  • Status changed from new to accepted

The Accessibility team thinks it may be best to have the successful logout message read to screen readers. The current success message is not connected via aria-describedby. I will work on a patch to test shortly.

Thanks.

Note: See TracTickets for help on using tickets.