Make WordPress Core


Ignore:
Timestamp:
07/22/2015 12:14:37 AM (11 years ago)
Author:
obenland
Message:

Passwords: Add password strength meter feedback for screen readers.

Also gives context to the show/hide button.

Props rianrietveld, afercia.
Fixes #33032.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/install.php

    r33249 r33353  
    141141                <div class="wp-pwd hide-if-js">
    142142                    <?php $initial_password = wp_generate_password( 24 ); ?>
    143                     <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" />
    144                     <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
     143                    <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
     144                    <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
    145145                        <span class="dashicons dashicons-visibility"></span>
    146146                        <span class="text"><?php _e( 'Hide' ); ?></span>
    147147                    </button>
    148                     <div id="pass-strength-result"></div>
     148                    <div id="pass-strength-result" aria-live="polite"></div>
    149149                </div>
    150150                <p><span class="description hide-if-no-js"><?php _e( 'A password reset link will be sent to you via email.' ); ?></span></p>
Note: See TracChangeset for help on using the changeset viewer.