Make WordPress Core

Ticket #33032: 33032.patch

File 33032.patch, 4.7 KB (added by rianrietveld, 9 years ago)

Adds ARIA for screen reader feedeback

  • wp-admin/install.php

     
    140140                                <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
    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 ); ?>" />
     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-labelledby="pass-strength-result" />
    144144                                        <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    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>
    151151                        </td>
  • wp-admin/user-edit.php

     
    464464                <input class="hidden" value=" " /><!-- #24364 workaround -->
    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 ) ); ?>" />
     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-labelledby="pass-strength-result" />
    468468                        <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    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>
    475475</tr>
  • wp-admin/user-new.php

     
    402402                        <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
    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 ); ?>" />
     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-labelledby="pass-strength-result" />
    406406                                <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0">
    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>
    413413                </td>
  • wp-login.php

     
    655655        <p class="user-pass1-wrap">
    656656                <label for="pass1"><?php _e('New password') ?></label><br />
    657657                <div class="wp-pwd">
    658                         <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" />
    659                         <div id="pass-strength-result" class="hide-if-no-js"><?php _e( 'Strength indicator' ); ?></div>
     658                        <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" aria-labelledby="pass-strength-result" />
     659                        <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
    660660                </div>
    661661        </p>
    662662        <p class="user-pass2-wrap">