Make WordPress Core

Ticket #54483: 54483.4.diff

File 54483.4.diff, 2.4 KB (added by afercia, 3 years ago)
  • src/wp-login.php

     
    261261                         *
    262262                         * @param string $messages Login messages.
    263263                         */
    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";
    265265                }
    266266        }
    267267} // End of login_header().
     
    13851385
    13861386                $rememberme = ! empty( $_POST['rememberme'] );
    13871387
    1388                 if ( $errors->has_errors() ) {
    1389                         $aria_describedby_error = ' aria-describedby="login_error"';
    1390                 } else {
    1391                         $aria_describedby_error = '';
     1388                $aria_describedby = '';
     1389                $has_errors       = $errors->has_errors();
     1390
     1391                if ( $has_errors ) {
     1392                        $aria_describedby = ' aria-describedby="login_error"';
     1393                }
     1394
     1395                if ( $has_errors && 'message' === $errors->get_error_data() ) {
     1396                        $aria_describedby = ' aria-describedby="login-message"';
    13921397                }
    13931398
    13941399                wp_enqueue_script( 'user-profile' );
     
    13971402                <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    13981403                        <p>
    13991404                                <label for="user_login"><?php _e( 'Username or Email Address' ); ?></label>
    1400                                 <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" autocomplete="username" />
     1405                                <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" autocomplete="username" />
    14011406                        </p>
    14021407
    14031408                        <div class="user-pass-wrap">
    14041409                                <label for="user_pass"><?php _e( 'Password' ); ?></label>
    14051410                                <div class="wp-pwd">
    1406                                         <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input password-input" value="" size="20" autocomplete="current-password" />
     1411                                        <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby; ?> class="input password-input" value="" size="20" autocomplete="current-password" />
    14071412                                        <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' ); ?>">
    14081413                                                <span class="dashicons dashicons-visibility" aria-hidden="true"></span>
    14091414                                        </button>