Make WordPress Core

Changeset 59978


Ignore:
Timestamp:
03/13/2025 10:02:28 AM (2 months ago)
Author:
audrasjb
Message:

Users: Remove unwanted aria-describedby attribute in User Edit.

This changeset removes the aria-describedby attribute when not editing the current user, as no description paragraph is associated.

Props kkmuffme, audrasjb, faisal03, shailu25, nandow, eddystile, marineevain, qhaensler, virginienacci.
Fixes #63006.

File:
1 edited

Legend:

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

    r59784 r59978  
    546546                        <th><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
    547547                        <td>
    548                             <input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profile_user->user_email ); ?>" class="regular-text ltr" />
    549548                            <?php if ( $profile_user->ID === $current_user->ID ) : ?>
     549                                <input type="email" name="email" id="email" aria-describedby="email-description" value="<?php echo esc_attr( $profile_user->user_email ); ?>" class="regular-text ltr" />
    550550                                <p class="description" id="email-description">
    551551                                    <?php _e( 'If you change this, an email will be sent at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>' ); ?>
    552552                                </p>
     553                            <?php else : ?>
     554                                <input type="email" name="email" id="email" value="<?php echo esc_attr( $profile_user->user_email ); ?>" class="regular-text ltr" />
    553555                            <?php endif; ?>
    554556
Note: See TracChangeset for help on using the changeset viewer.