Make WordPress Core


Ignore:
Timestamp:
04/08/2022 05:38:55 PM (2 years ago)
Author:
joedolson
Message:

Users: Use autocomplete values on user profiles.

Assign appropriate autocomplete values for new and edited user, user email, and password fields.

Props clonemykey, sabernhardt, WraithKenny, bookdude13, konradyoast.
Fixes #43886, #52714.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-new.php

    r53063 r53111  
    513513    <tr class="form-field form-required">
    514514        <th scope="row"><label for="user_login"><?php _e( 'Username' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
    515         <td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" maxlength="60" /></td>
     515        <td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" autocomplete="off" maxlength="60" /></td>
    516516    </tr>
    517517    <tr class="form-field form-required">
     
    572572                <?php $initial_password = wp_generate_password( 24 ); ?>
    573573                <span class="password-input-wrapper">
    574                     <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" />
     574                    <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="new-password" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
    575575                </span>
    576576                <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
     
    585585        <th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
    586586        <td>
    587         <input name="pass2" type="password" id="pass2" autocomplete="off" aria-describedby="pass2-desc" />
     587        <input name="pass2" type="password" id="pass2" autocomplete="new-password" aria-describedby="pass2-desc" />
    588588        <p class="description" id="pass2-desc"><?php _e( 'Type the password again.' ); ?></p>
    589589        </td>
Note: See TracChangeset for help on using the changeset viewer.