Make WordPress Core

Changeset 55892

Timestamp:
06/07/2023 09:23:08 PM (14 months ago)
Author:
audrasjb
Message:

Users: Use type="hidden" for hidden input on User edit administration panel.

This hidden field added in [24552] to fix an issue with Chrome that was ignoring autocomplete="off" in <input>, by using a hidden, non-named, non-empty
input right before the password field. However this input was only hidden via CSS and didn't have any label, which is considered as an accessibility issue.
This changeset replaces class="hidden" with type="hidden" to properly indicate to user agents that it is an hidden field.

Follow-up to [24552].

Props smit08, audrasjb, sabernhardt, ryokuhi, tushar284, ashikurwp, siddhantwadhwani, pavanpatil1.
Fixes #56776.

--Cette ligne, et les suivantes

ci-dessous, seront ignorées--

M trunk/src/wp-admin/user-edit.php
M trunk/src/wp-admin/user-new.php

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r55606 r55892  
    641641                                <th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
    642642                                <td>
    643                                     <input class="hidden" value=" " /><!-- #24364 workaround -->
     643                                    <input ="hidden" value=" " /><!-- #24364 workaround -->
    644644                                    <button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="false"><?php _e( 'Set New Password' ); ?></button>
    645645                                    <div class="wp-pwd hide-if-js">
  • trunk/src/wp-admin/user-new.php

    r55412 r55892  
    567567        </th>
    568568        <td>
    569             <input class="hidden" value=" " /><!-- #24364 workaround -->
     569            <input ="hidden" value=" " /><!-- #24364 workaround -->
    570570            <button type="button" class="button wp-generate-pw hide-if-no-js"><?php _e( 'Generate password' ); ?></button>
    571571            <div class="wp-pwd">
Note: See TracChangeset for help on using the changeset viewer.