Make WordPress Core

Changeset 53111


Ignore:
Timestamp:
04/08/2022 05:38:55 PM (3 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.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r52978 r53111  
    141141                <div class="wp-pwd">
    142142                    <?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
    143                     <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
     143                    <input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="new-password" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
    144144                    <button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
    145145                        <span class="dashicons dashicons-hidden"></span>
     
    161161            </th>
    162162            <td>
    163                 <input name="admin_password2" type="password" id="pass2" autocomplete="off" />
     163                <input name="admin_password2" type="password" id="pass2" autocomplete="new-password" />
    164164            </td>
    165165        </tr>
  • trunk/src/wp-admin/user-edit.php

    r53102 r53111  
    639639                                    <div class="wp-pwd hide-if-js">
    640640                                        <span class="password-input-wrapper">
    641                                             <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
     641                                            <input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="new-password" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
    642642                                        </span>
    643643                                        <button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
     
    656656                                <th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
    657657                                <td>
    658                                 <input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" aria-describedby="pass2-desc" />
     658                                <input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="new-password" aria-describedby="pass2-desc" />
    659659                                    <?php if ( IS_PROFILE_PAGE ) : ?>
    660660                                        <p class="description" id="pass2-desc"><?php _e( 'Type your new password again.' ); ?></p>
  • 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>
  • trunk/src/wp-login.php

    r53068 r53111  
    952952
    953953                <div class="wp-pwd">
    954                     <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" />
     954                    <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="new-password" aria-describedby="pass-strength-result" />
    955955
    956956                    <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' ); ?>">
     
    967967            <p class="user-pass2-wrap">
    968968                <label for="pass2"><?php _e( 'Confirm new password' ); ?></label>
    969                 <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
     969                <input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="new-password" />
    970970            </p>
    971971
Note: See TracChangeset for help on using the changeset viewer.