diff --git src/js/_enqueues/admin/user-profile.js src/js/_enqueues/admin/user-profile.js
index ff4830242c..c946c20243 100644
|
|
|
63 | 63 | |
64 | 64 | function resetToggle( show ) { |
65 | 65 | $toggleButton |
66 | | .attr({ |
67 | | 'aria-label': show ? userProfileL10n.ariaShow : userProfileL10n.ariaHide |
68 | | }) |
69 | 66 | .find( '.text' ) |
70 | | .text( show ? userProfileL10n.show : userProfileL10n.hide ) |
| 67 | .text( show ? userProfileL10n.showPass : userProfileL10n.hidePass ) |
71 | 68 | .end() |
72 | 69 | .find( '.dashicons' ) |
73 | 70 | .removeClass( show ? 'dashicons-hidden' : 'dashicons-visibility' ) |
diff --git src/wp-admin/css/login.css src/wp-admin/css/login.css
index f0261a6819..ae212d646e 100644
|
|
p { |
80 | 80 | } |
81 | 81 | |
82 | 82 | .login .button.wp-hide-pw { |
| 83 | display: block; |
83 | 84 | background: transparent; |
84 | 85 | border: 1px solid transparent; |
85 | 86 | box-shadow: none; |
86 | | font-size: 14px; |
| 87 | font-size: 12px; |
87 | 88 | line-height: 2; |
88 | | width: 2.5rem; |
89 | | height: 2.5rem; |
90 | | min-width: 40px; |
91 | | min-height: 40px; |
92 | | margin: 0; |
93 | | padding: 5px 9px; |
94 | | position: absolute; |
95 | | right: 0; |
96 | | top: 0; |
| 89 | height: 1.25rem; |
| 90 | margin: -15px 0 0 auto; |
| 91 | padding: 0; |
| 92 | position: relative; |
| 93 | z-index: 10; |
97 | 94 | } |
98 | 95 | |
99 | 96 | .login .button.wp-hide-pw:hover { |
100 | 97 | background: transparent; |
101 | 98 | } |
102 | 99 | |
103 | | .login .button.wp-hide-pw:focus { |
104 | | background: transparent; |
105 | | border-color: #007cba; |
106 | | box-shadow: 0 0 0 1px #007cba; |
107 | | /* Only visible in Windows High Contrast mode */ |
108 | | outline: 2px solid transparent; |
109 | | } |
110 | | |
111 | 100 | .login .button.wp-hide-pw:active { |
112 | 101 | background: transparent; |
113 | 102 | box-shadow: none; |
… |
… |
p { |
115 | 104 | } |
116 | 105 | |
117 | 106 | .login .button.wp-hide-pw .dashicons { |
118 | | width: 1.25rem; |
| 107 | width: 1rem; |
119 | 108 | height: 1.25rem; |
120 | 109 | top: 0.25rem; |
| 110 | font-size: 16px; |
121 | 111 | } |
122 | 112 | |
123 | 113 | .login .wp-pwd { |
124 | 114 | position: relative; |
125 | 115 | } |
126 | 116 | |
| 117 | @media screen and (max-width: 782px) { |
| 118 | .login .button.wp-hide-pw { |
| 119 | right: auto; |
| 120 | width: auto; |
| 121 | } |
| 122 | |
| 123 | .login .button.wp-hide-pw .text { |
| 124 | display: inline; |
| 125 | } |
| 126 | } |
| 127 | |
127 | 128 | .no-js .hide-if-no-js { |
128 | 129 | display: none; |
129 | 130 | } |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index ef085b5c93..ef5cddccd6 100644
|
|
function wp_default_scripts( &$scripts ) { |
1156 | 1156 | 'show' => __( 'Show' ), |
1157 | 1157 | 'hide' => __( 'Hide' ), |
1158 | 1158 | 'cancel' => __( 'Cancel' ), |
1159 | | 'ariaShow' => esc_attr__( 'Show password' ), |
1160 | | 'ariaHide' => esc_attr__( 'Hide password' ), |
| 1159 | 'showPass' => esc_attr__( 'Show password' ), |
| 1160 | 'hidePass' => esc_attr__( 'Hide password' ), |
1161 | 1161 | ) |
1162 | 1162 | ); |
1163 | 1163 | |
diff --git src/wp-login.php src/wp-login.php
index 0b552ef326..9831a95d01 100644
|
|
switch ( $action ) { |
969 | 969 | <div class="wp-pwd"> |
970 | 970 | <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" /> |
971 | 971 | |
972 | | <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' ); ?>"> |
| 972 | <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div> |
| 973 | |
| 974 | <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0"> |
973 | 975 | <span class="dashicons dashicons-hidden" aria-hidden="true"></span> |
| 976 | <span class="text"><?php _e( 'Hide password' ); ?></span> |
974 | 977 | </button> |
975 | | <div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php _e( 'Strength indicator' ); ?></div> |
976 | 978 | </div> |
977 | 979 | <div class="pw-weak"> |
978 | 980 | <input type="checkbox" name="pw_weak" id="pw-weak" class="pw-checkbox" /> |
… |
… |
switch ( $action ) { |
1371 | 1373 | <label for="user_pass"><?php _e( 'Password' ); ?></label> |
1372 | 1374 | <div class="wp-pwd"> |
1373 | 1375 | <input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input password-input" value="" size="20" /> |
1374 | | <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' ); ?>"> |
1375 | | <span class="dashicons dashicons-visibility" aria-hidden="true"></span> |
1376 | | </button> |
1377 | 1376 | </div> |
| 1377 | <button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0"> |
| 1378 | <span class="dashicons dashicons-visibility" aria-hidden="true"></span> |
| 1379 | <span class="text"><?php _e( 'Show password' ); ?></span> |
| 1380 | </button> |
1378 | 1381 | </div> |
1379 | 1382 | <?php |
1380 | 1383 | |