-<?php if ( apply_filters('show_password_fields', true) ) : ?>
- <tr class="form-field form-required">
- <th scope="row"><label for="pass1"><?php _e('Password'); ?> <span class="description"><?php /* translators: password input field */_e('(twice, required)'); ?></span></label></th>
- <td><input name="pass1" type="password" id="pass1" autocomplete="off" />
- <br />
+<?php
+/**
+ * Filter the display of the password fields.
+ *
+ * @since 1.5.1
+ *
+ * @param bool $show Whether to show the password fields. Default true.
+ */
+if ( apply_filters( 'show_password_fields', true ) ) : ?>
+ <tr class="form-field form-required user-pass1-wrap">
+ <th scope="row">
+ <label for="pass1">
+ <?php _e( 'Password' ); ?>
+ <span class="description hide-if-js"><?php _e( '(required)' ); ?></span>
+ </label>
+ </th>
+ <td>
+ <input class="hidden" value=" " /><!-- #24364 workaround -->
+ <button type="button" class="button button-secondary wp-generate-pw hide-if-no-js"><?php _e( 'Show password' ); ?></button>
+ <div class="wp-pwd hide-if-js">
+ <?php $initial_password = wp_generate_password( 24 ); ?>
+ <span class="password-input-wrapper">
+ <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
+ </span>
+ <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' ); ?>">
+ <span class="dashicons dashicons-hidden"></span>
+ <span class="text"><?php _e( 'Hide' ); ?></span>
+ </button>
+ <button type="button" class="button button-secondary wp-cancel-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Cancel password change' ); ?>">
+ <span class="text"><?php _e( 'Cancel' ); ?></span>
+ </button>
+ <div style="display:none" id="pass-strength-result" aria-live="polite"></div>
+ </div>
+ <p><span class="description"><?php _e( 'A password reset link will be sent to the user via email.' ); ?></span></p>
+ </td>
+ </tr>
+ <tr class="form-field form-required user-pass2-wrap hide-if-js">
+ <th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
+ <td>