Make WordPress Core


Ignore:
Timestamp:
03/13/2019 11:36:45 PM (6 years ago)
Author:
afercia
Message:

Accessibility: Improve the password form buttons accessibility.

  • makes the "Cancel" button always visible: this allows to generate a new password also on small screens
  • moves focus back to the Generate Password button when closing the form
  • changes the password reset show/hide button from a clickable <span> element to a real <button> element
  • improves the CSS

Props janak007, afercia.
Fixes #42853.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r44776 r44895  
    713713            <div class="password-input-wrapper">
    714714                <input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" />
    715                 <span class="button button-secondary wp-hide-pw hide-if-no-js">
    716                     <span class="dashicons dashicons-hidden"></span>
    717                 </span>
     715                <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js">
     716                    <span class="dashicons dashicons-hidden" aria-hidden="true"></span>
     717                </button>
    718718            </div>
    719719            <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div>
Note: See TracChangeset for help on using the changeset viewer.