Skip to content

Commit edafa4a

Browse files
committed
User: Make the user_login field readonly instead of disabled.
On the profile edit screen in ``wp-admin, the username was previously displayed using an input field with the `disabled` attribute. This field was skipped by screen readers, which leads to a loss of information for visually impaired users. This changeset switches it to a `readonly` attribute, which is exactly the purpose of this field. Props roytanck, audrasjb, rajinsharwar, joedolson. Fixes #60774. git-svn-id: https://develop.svn.wordpress.org/trunk@58280 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 019e0e9 commit edafa4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-admin/user-edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@
438438
<table class="form-table" role="presentation">
439439
<tr class="user-user-login-wrap">
440440
<th><label for="user_login"><?php _e( 'Username' ); ?></label></th>
441-
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profile_user->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
441+
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profile_user->user_login ); ?>" readonly="readonly" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
442442
</tr>
443443

444444
<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profile_user->ID ) ) : ?>

0 commit comments

Comments
 (0)