Make WordPress Core


Ignore:
Timestamp:
02/23/2015 02:28:41 AM (11 years ago)
Author:
jeremyfelt
Message:

Provide proper label associations and descriptions throughout the network admin

  • Add labels previously missing for many inputs throughout the network admin screen.
  • Add proper aria-describedby attributes to provide better descriptions.
  • Wrap grouped inputs with fieldset elements.
  • Remove now unneeded title attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-users.php

    r31200 r31517  
    263263        <table class="form-table">
    264264                <tr>
    265                         <th scope="row"><?php _e( 'Username' ); ?></th>
     265                        <th scope="row"><label for="newuser"><?php _e( 'Username' ); ?></label></th>
    266266                        <td><input type="text" class="regular-text wp-suggest-user" name="newuser" id="newuser" /></td>
    267267                </tr>
    268268                <tr>
    269                         <th scope="row"><?php _e( 'Role' ); ?></th>
    270                         <td><select name="new_role" id="new_role_0">
     269                        <th scope="row"><label for="new_role_adduser"><?php _e( 'Role' ); ?></label></th>
     270                        <td><select name="new_role" id="new_role_adduser">
    271271                        <?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
    272272                        </select></td>
     
    292292        <table class="form-table">
    293293                <tr>
    294                         <th scope="row"><?php _e( 'Username' ) ?></th>
    295                         <td><input type="text" class="regular-text" name="user[username]" /></td>
    296                 </tr>
    297                 <tr>
    298                         <th scope="row"><?php _e( 'Email' ) ?></th>
    299                         <td><input type="text" class="regular-text" name="user[email]" /></td>
    300                 </tr>
    301                 <tr>
    302                         <th scope="row"><?php _e( 'Role' ); ?></th>
    303                         <td><select name="new_role" id="new_role_0">
     294                        <th scope="row"><label for="user_username"><?php _e( 'Username' ) ?></label></th>
     295                        <td><input type="text" class="regular-text" name="user[username]" id="user_username" /></td>
     296                </tr>
     297                <tr>
     298                        <th scope="row"><label for="user_email"><?php _e( 'Email' ) ?></label></th>
     299                        <td><input type="text" class="regular-text" name="user[email]" id="user_email" /></td>
     300                </tr>
     301                <tr>
     302                        <th scope="row"><label for="new_role_newuser"><?php _e( 'Role' ); ?></label></th>
     303                        <td><select name="new_role" id="new_role_newuser">
    304304                        <?php wp_dropdown_roles( get_option( 'default_role' ) ); ?>
    305305                        </select></td>
Note: See TracChangeset for help on using the changeset viewer.