Make WordPress Core


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

    r33249 r33353  
    465465        <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Generate new password' ); ?></button>
    466466        <div class="wp-pwd hide-if-js">
    467             <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" />
    468             <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
     467            <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
     468            <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' ); ?>">
    469469                <span class="dashicons dashicons-visibility"></span>
    470470                <span class="text"><?php _e( 'Hide' ); ?></span>
    471471            </button>
    472             <div style="display:none" id="pass-strength-result"></div>
     472            <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
    473473        </div>
    474474    </td>
Note: See TracChangeset for help on using the changeset viewer.