mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Implement an aria-describedby attribute for login screen errors, and improve the "Forgot password?" anchor text.
Props aferica, rianrietveld Fixes #31143 git-svn-id: https://develop.svn.wordpress.org/trunk@31871 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+8
-2
@@ -889,16 +889,22 @@ default:
|
||||
if ( isset($_POST['log']) )
|
||||
$user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(wp_unslash($_POST['log'])) : '';
|
||||
$rememberme = ! empty( $_POST['rememberme'] );
|
||||
|
||||
if ( ! empty( $errors->errors ) ) {
|
||||
$aria_describedby_error = ' aria-describedby="login_error"';
|
||||
} else {
|
||||
$aria_describedby_error = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
|
||||
<p>
|
||||
<label for="user_login"><?php _e('Username') ?><br />
|
||||
<input type="text" name="log" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>
|
||||
<input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="user_pass"><?php _e('Password') ?><br />
|
||||
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
|
||||
<input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label>
|
||||
</p>
|
||||
<?php
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user