Make WordPress Core


Ignore:
Timestamp:
07/22/2015 12:14:37 AM (10 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/user-new.php

    r33249 r33353  
    403403            <div class="wp-pwd hide-if-js">
    404404                <?php $initial_password = wp_generate_password( 24 ); ?>
    405                 <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" />
    406                 <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
     405                <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
     406                <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' ); ?>">
    407407                    <span class="dashicons dashicons-visibility"></span>
    408408                    <span class="text"><?php _e( 'Hide' ); ?></span>
    409409                </button>
    410                 <div style="display:none" id="pass-strength-result"></div>
     410                <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
    411411            </div>
    412412            <p><span class="description"><?php _e( 'A password reset link will be sent to the user via email.' ); ?></span></p>
Note: See TracChangeset for help on using the changeset viewer.