Ticket #54483: 54483.3.diff
File 54483.3.diff, 2.3 KB (added by , 3 years ago) |
---|
-
src/wp-login.php
261 261 * 262 262 * @param string $messages Login messages. 263 263 */ 264 echo '<p class="message" >' . apply_filters( 'login_messages', $messages ) . "</p>\n";264 echo '<p class="message" id="login-message">' . apply_filters( 'login_messages', $messages ) . "</p>\n"; 265 265 } 266 266 } 267 267 } // End of login_header(). … … 1376 1376 1377 1377 $rememberme = ! empty( $_POST['rememberme'] ); 1378 1378 1379 if ( $errors->has_errors() ) { 1380 $aria_describedby_error = ' aria-describedby="login_error"'; 1381 } else { 1382 $aria_describedby_error = ''; 1379 $aria_describedby = ''; 1380 $has_errors = $errors->has_errors(); 1381 1382 if ( $has_errors ) { 1383 $aria_describedby = ' aria-describedby="login_error"'; 1383 1384 } 1384 1385 1386 if ( $has_errors && 'message' === $errors->get_error_data() ) { 1387 $aria_describedby = ' aria-describedby="login-message"'; 1388 } 1389 1385 1390 wp_enqueue_script( 'user-profile' ); 1386 1391 ?> 1387 1392 … … 1388 1393 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"> 1389 1394 <p> 1390 1395 <label for="user_login"><?php _e( 'Username or Email Address' ); ?></label> 1391 <input type="text" name="log" id="user_login"<?php echo $aria_describedby _error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" />1396 <input type="text" name="log" id="user_login"<?php echo $aria_describedby; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" autocapitalize="off" /> 1392 1397 </p> 1393 1398 1394 1399 <div class="user-pass-wrap"> 1395 1400 <label for="user_pass"><?php _e( 'Password' ); ?></label> 1396 1401 <div class="wp-pwd"> 1397 <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby _error; ?> class="input password-input" value="" size="20" />1402 <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby; ?> class="input password-input" value="" size="20" /> 1398 1403 <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Show password' ); ?>"> 1399 1404 <span class="dashicons dashicons-visibility" aria-hidden="true"></span> 1400 1405 </button>