diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js
index b379c0abfa..18235b5768 100644
|
a
|
b
|
|
| 70 | 70 | |
| 71 | 71 | function resetToggle( show ) { |
| 72 | 72 | $toggleButton |
| 73 | | .attr({ |
| 74 | | 'aria-label': show ? __( 'Show password' ) : __( 'Hide password' ) |
| 75 | | }) |
| 76 | 73 | .find( '.text' ) |
| 77 | | .text( show ? __( 'Show' ) : __( 'Hide' ) ) |
| | 74 | .text( show ? __( 'Show password' ) : __( 'Hide password' ) ) |
| 78 | 75 | .end() |
| 79 | 76 | .find( '.dashicons' ) |
| 80 | 77 | .removeClass( show ? 'dashicons-hidden' : 'dashicons-visibility' ) |
diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css
index 1f89db216e..6dcd8d2fd5 100644
|
a
|
b
|
p { |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | .login .button.wp-hide-pw { |
| | 84 | display: block; |
| 84 | 85 | background: transparent; |
| 85 | 86 | border: 1px solid transparent; |
| 86 | 87 | box-shadow: none; |
| 87 | | font-size: 14px; |
| 88 | 88 | line-height: 2; |
| 89 | | width: 2.5rem; |
| 90 | | height: 2.5rem; |
| 91 | | min-width: 40px; |
| 92 | | min-height: 40px; |
| 93 | | margin: 0; |
| 94 | | padding: 5px 9px; |
| 95 | | position: absolute; |
| 96 | | right: 0; |
| 97 | | top: 0; |
| | 89 | font-size: 12px; |
| | 90 | height: 1.25rem; |
| | 91 | margin: -12px 0 12px auto; |
| | 92 | padding: 0 2px; |
| | 93 | position: relative; |
| | 94 | z-index: 10; |
| 98 | 95 | } |
| 99 | 96 | |
| 100 | 97 | .login .button.wp-hide-pw:hover { |
| … |
… |
p { |
| 116 | 113 | } |
| 117 | 114 | |
| 118 | 115 | .login .button.wp-hide-pw .dashicons { |
| 119 | | width: 1.25rem; |
| | 116 | width: 1rem; |
| 120 | 117 | height: 1.25rem; |
| 121 | 118 | top: 0.25rem; |
| | 119 | font-size: 16px; |
| 122 | 120 | } |
| 123 | 121 | |
| 124 | 122 | .login .wp-pwd { |
| 125 | 123 | position: relative; |
| 126 | 124 | } |
| 127 | 125 | |
| | 126 | @media screen and (max-width: 782px) { |
| | 127 | .login .button.wp-hide-pw { |
| | 128 | right: auto; |
| | 129 | width: auto; |
| | 130 | } |
| | 131 | |
| | 132 | .login .button.wp-hide-pw .text { |
| | 133 | display: inline; |
| | 134 | } |
| | 135 | } |
| | 136 | |
| 128 | 137 | .no-js .hide-if-no-js { |
| 129 | 138 | display: none; |
| 130 | 139 | } |
| … |
… |
p { |
| 342 | 351 | font-family: Consolas, Monaco, monospace; |
| 343 | 352 | } |
| 344 | 353 | |
| 345 | | .js.login input.password-input, |
| 346 | | .js.login-action-rp form .input, |
| 347 | | .js.login-action-rp input[type="text"] { |
| 348 | | padding-right: 2.5rem; |
| 349 | | } |
| 350 | | |
| 351 | 354 | .login form .input, |
| 352 | 355 | .login input[type="text"], |
| 353 | 356 | .login form input[type="checkbox"] { |
diff --git a/src/wp-login.php b/src/wp-login.php
index 5975a3d58f..07e0a38b99 100644
|
a
|
b
|
switch ( $action ) { |
| 946 | 946 | <div class="wp-pwd"> |
| 947 | 947 | <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" /> |
| 948 | 948 | |
| 949 | | <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' ); ?>"> |
| | 949 | <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div> |
| | 950 | <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0"> |
| 950 | 951 | <span class="dashicons dashicons-hidden" aria-hidden="true"></span> |
| | 952 | <span class="text"><?php _e( 'Hide password' ); ?></span> |
| 951 | 953 | </button> |
| 952 | | <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div> |
| 953 | 954 | </div> |
| 954 | 955 | <div class="pw-weak"> |
| 955 | 956 | <input type="checkbox" name="pw_weak" id="pw-weak" class="pw-checkbox" /> |
| … |
… |
switch ( $action ) { |
| 1395 | 1396 | <label for="user_pass"><?php _e( 'Password' ); ?></label> |
| 1396 | 1397 | <div class="wp-pwd"> |
| 1397 | 1398 | <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input password-input" value="" size="20" /> |
| 1398 | | <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Show password' ); ?>"> |
| | 1399 | <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0"> |
| 1399 | 1400 | <span class="dashicons dashicons-visibility" aria-hidden="true"></span> |
| | 1401 | <span class="text"><?php _e( 'Show password' ); ?></span> |
| 1400 | 1402 | </button> |
| 1401 | 1403 | </div> |
| 1402 | 1404 | </div> |