WordPress.org

Make WordPress Core

Changeset 31517


Ignore:
Timestamp:
02/23/2015 02:28:41 AM (5 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.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r31188 r31517  
    386386
    387387            // Set up the checkbox ( because the user is editable, otherwise it's empty )
    388             $checkbox = '<label class="screen-reader-text" for="cb-select-' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
     388            $checkbox = '<label class="screen-reader-text" for="user_' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
    389389                        . "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
    390390
  • trunk/src/wp-admin/includes/dashboard.php

    r31508 r31517  
    380380    <form action="<?php echo network_admin_url('users.php'); ?>" method="get">
    381381        <p>
    382             <input type="search" name="s" value="" size="30" autocomplete="off" />
     382            <label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
     383            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
    383384            <?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?>
    384385        </p>
     
    387388    <form action="<?php echo network_admin_url('sites.php'); ?>" method="get">
    388389        <p>
    389             <input type="search" name="s" value="" size="30" autocomplete="off" />
     390            <label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
     391            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
    390392            <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?>
    391393        </p>
  • trunk/src/wp-admin/includes/ms.php

    r31404 r31517  
    477477    ?>
    478478    <tr>
    479         <th><?php _e( 'Site Upload Space Quota '); ?></th>
    480         <td><input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" value="<?php echo $quota; ?>" /> <?php _e( 'MB (Leave blank for network default)' ); ?></td>
     479        <th><label for="blog-upload-space-number"><?php _e( 'Site Upload Space Quota' ); ?></label></th>
     480        <td>
     481            <input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" id="blog-upload-space-number" aria-describedby="blog-upload-space-desc" value="<?php echo $quota; ?>" />
     482            <span id="blog-upload-space-desc"><span class="screen-reader-text"><?php _e( 'Size in megabytes' ); ?></span> <?php _e( 'MB (Leave blank for network default)' ); ?></span>
     483        </td>
    481484    </tr>
    482485    <?php
     
    785788    <tr>
    786789    <?php /* translators: My sites label */ ?>
    787         <th scope="row"><?php _e( 'Primary Site' ); ?></th>
     790        <th scope="row"><label for="primary_blog"><?php _e( 'Primary Site' ); ?></label></th>
    788791        <td>
    789792        <?php
     
    793796            $found = false;
    794797            ?>
    795             <select name="primary_blog">
     798            <select name="primary_blog" id="primary_blog">
    796799                <?php foreach( (array) $all_blogs as $blog ) {
    797800                    if ( $primary_blog == $blog->userblog_id )
  • trunk/src/wp-admin/network/settings.php

    r30705 r31517  
    135135                <th scope="row"><label for="admin_email"><?php _e( 'Network Admin Email' ) ?></label></th>
    136136                <td>
    137                     <input name="admin_email" type="email" id="admin_email" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
    138                     <p class="description">
     137                    <input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_site_option( 'admin_email' ) ) ?>" />
     138                    <p class="description" id="admin-email-desc">
    139139                        <?php _e( 'This email address will receive notifications. Registration and support emails will also come from this address.' ); ?>
    140140                    </p>
     
    152152                ?>
    153153                <td>
     154                    <fieldset>
     155                    <legend class="screen-reader-text"><?php _e( 'New registrations settings' ) ?></legend>
    154156                    <label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none') ?> /> <?php _e( 'Registration is disabled.' ); ?></label><br />
    155157                    <label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user') ?> /> <?php _e( 'User accounts may be registered.' ); ?></label><br />
    156158                    <label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog') ?> /> <?php _e( 'Logged in users may register new sites.' ); ?></label><br />
    157159                    <label><input name="registration" type="radio" id="registration4" value="all"<?php checked( $reg, 'all') ?> /> <?php _e( 'Both sites and user accounts can be registered.' ); ?></label>
    158                     <p class="description">
    159                         <?php if ( is_subdomain_install() )
    160                         _e( 'If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a URL you will redirect visitors to if they visit a non-existent site.' );
    161                     ?>
    162                     </p>
     160                    <?php if ( is_subdomain_install() ) {
     161                        echo '<p class="description">' . __( 'If registration is disabled, please set <code>NOBLOGREDIRECT</code> in <code>wp-config.php</code> to a URL you will redirect visitors to if they visit a non-existent site.' ) . '</p>';
     162                    } ?>
     163                    </fieldset>
    163164                </td>
    164165            </tr>
     
    185186                <th scope="row"><label for="illegal_names"><?php _e( 'Banned Names' ) ?></label></th>
    186187                <td>
    187                     <input name="illegal_names" type="text" id="illegal_names" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
    188                     <p class="description">
     188                    <input name="illegal_names" type="text" id="illegal_names" aria-describedby="illegal-names-desc" class="large-text" value="<?php echo esc_attr( implode( " ", (array) get_site_option( 'illegal_names' ) ) ); ?>" size="45" />
     189                    <p class="description" id="illegal-names-desc">
    189190                        <?php _e( 'Users are not allowed to register these sites. Separate names by spaces.' ) ?>
    190191                    </p>
     
    197198                    <?php $limited_email_domains = get_site_option( 'limited_email_domains' );
    198199                    $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?>
    199                     <textarea name="limited_email_domains" id="limited_email_domains" cols="45" rows="5">
     200                    <textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
    200201<?php echo esc_textarea( $limited_email_domains == '' ? '' : implode( "\n", (array) $limited_email_domains ) ); ?></textarea>
    201                     <p class="description">
     202                    <p class="description" id="limited-email-domains-desc">
    202203                        <?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ) ?>
    203204                    </p>
     
    208209                <th scope="row"><label for="banned_email_domains"><?php _e('Banned Email Domains') ?></label></th>
    209210                <td>
    210                     <textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5">
     211                    <textarea name="banned_email_domains" id="banned_email_domains" aria-describedby="banned-email-domains-desc" cols="45" rows="5">
    211212<?php echo esc_textarea( get_site_option( 'banned_email_domains' ) == '' ? '' : implode( "\n", (array) get_site_option( 'banned_email_domains' ) ) ); ?></textarea>
    212                     <p class="description">
     213                    <p class="description" id="banned-email-domains-desc">
    213214                        <?php _e( 'If you want to ban domains from site registrations. One domain per line.' ) ?>
    214215                    </p>
     
    223224                <th scope="row"><label for="welcome_email"><?php _e( 'Welcome Email' ) ?></label></th>
    224225                <td>
    225                     <textarea name="welcome_email" id="welcome_email" rows="5" cols="45" class="large-text">
     226                    <textarea name="welcome_email" id="welcome_email" aria-describedby="welcome-email-desc" rows="5" cols="45" class="large-text">
    226227<?php echo esc_textarea( get_site_option( 'welcome_email' ) ) ?></textarea>
    227                     <p class="description">
     228                    <p class="description" id="welcome-email-desc">
    228229                        <?php _e( 'The welcome email sent to new site owners.' ) ?>
    229230                    </p>
     
    233234                <th scope="row"><label for="welcome_user_email"><?php _e( 'Welcome User Email' ) ?></label></th>
    234235                <td>
    235                     <textarea name="welcome_user_email" id="welcome_user_email" rows="5" cols="45" class="large-text">
     236                    <textarea name="welcome_user_email" id="welcome_user_email" aria-describedby="welcome-user-email-desc" rows="5" cols="45" class="large-text">
    236237<?php echo esc_textarea( get_site_option( 'welcome_user_email' ) ) ?></textarea>
    237                     <p class="description">
     238                    <p class="description" id="welcome-user-email-desc">
    238239                        <?php _e( 'The welcome email sent to new users.' ) ?>
    239240                    </p>
     
    243244                <th scope="row"><label for="first_post"><?php _e( 'First Post' ) ?></label></th>
    244245                <td>
    245                     <textarea name="first_post" id="first_post" rows="5" cols="45" class="large-text">
     246                    <textarea name="first_post" id="first_post" aria-describedby="first-post-desc" rows="5" cols="45" class="large-text">
    246247<?php echo esc_textarea( get_site_option( 'first_post' ) ) ?></textarea>
    247                     <p class="description">
     248                    <p class="description" id="first-post-desc">
    248249                        <?php _e( 'The first post on a new site.' ) ?>
    249250                    </p>
     
    253254                <th scope="row"><label for="first_page"><?php _e( 'First Page' ) ?></label></th>
    254255                <td>
    255                     <textarea name="first_page" id="first_page" rows="5" cols="45" class="large-text">
     256                    <textarea name="first_page" id="first_page" aria-describedby="first-page-desc" rows="5" cols="45" class="large-text">
    256257<?php echo esc_textarea( get_site_option( 'first_page' ) ) ?></textarea>
    257                     <p class="description">
     258                    <p class="description" id="first-page-desc">
    258259                        <?php _e( 'The first page on a new site.' ) ?>
    259260                    </p>
     
    263264                <th scope="row"><label for="first_comment"><?php _e( 'First Comment' ) ?></label></th>
    264265                <td>
    265                     <textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text">
     266                    <textarea name="first_comment" id="first_comment" aria-describedby="first-comment-desc" rows="5" cols="45" class="large-text">
    266267<?php echo esc_textarea( get_site_option( 'first_comment' ) ) ?></textarea>
    267                     <p class="description">
     268                    <p class="description" id="first-comment-desc">
    268269                        <?php _e( 'The first comment on a new site.' ) ?>
    269270                    </p>
     
    273274                <th scope="row"><label for="first_comment_author"><?php _e( 'First Comment Author' ) ?></label></th>
    274275                <td>
    275                     <input type="text" size="40" name="first_comment_author" id="first_comment_author" value="<?php echo get_site_option('first_comment_author') ?>" />
    276                     <p class="description">
     276                    <input type="text" size="40" name="first_comment_author" id="first_comment_author" aria-describedby="first-comment-author-desc" value="<?php echo get_site_option('first_comment_author') ?>" />
     277                    <p class="description" id="first-comment-author-desc">
    277278                        <?php _e( 'The author of the first comment on a new site.' ) ?>
    278279                    </p>
     
    282283                <th scope="row"><label for="first_comment_url"><?php _e( 'First Comment URL' ) ?></label></th>
    283284                <td>
    284                     <input type="text" size="40" name="first_comment_url" id="first_comment_url" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
    285                     <p class="description">
     285                    <input type="text" size="40" name="first_comment_url" id="first_comment_url" aria-describedby="first-comment-url-desc" value="<?php echo esc_attr( get_site_option( 'first_comment_url' ) ) ?>" />
     286                    <p class="description" id="first-comment-url-desc">
    286287                        <?php _e( 'The URL for the first comment on a new site.' ) ?>
    287288                    </p>
     
    294295                <th scope="row"><?php _e( 'Site upload space' ) ?></th>
    295296                <td>
    296                 <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
     297                    <label><input type="checkbox" id="upload_space_check_disabled" name="upload_space_check_disabled" value="0"<?php checked( get_site_option( 'upload_space_check_disabled' ), 0 ) ?>/> <?php printf( __( 'Limit total size of files uploaded to %s MB' ), '</label><label><input name="blog_upload_space" type="number" min="0" style="width: 100px" id="blog_upload_space" aria-describedby="blog-upload-space-desc" value="' . esc_attr( get_site_option('blog_upload_space', 100) ) . '" />' ); ?></label><br />
     298                    <p class="screen-reader-text" id="blog-upload-space-desc">
     299                        <?php _e( 'Size in megabytes' ) ?>
     300                    </p>
    297301                </td>
    298302            </tr>
     
    300304            <tr>
    301305                <th scope="row"><label for="upload_filetypes"><?php _e( 'Upload file types' ) ?></label></th>
    302                 <td><input name="upload_filetypes" type="text" id="upload_filetypes" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" /></td>
     306                <td>
     307                    <input name="upload_filetypes" type="text" id="upload_filetypes" aria-describedby="upload-filetypes-desc" class="large-text" value="<?php echo esc_attr( get_site_option( 'upload_filetypes', 'jpg jpeg png gif' ) ) ?>" size="45" />
     308                    <p class="description" id="upload-filetypes-desc">
     309                        <?php _e( 'Allowed file types. Separate types by spaces.' ) ?>
     310                    </p>
     311                </td>
    303312            </tr>
    304313
    305314            <tr>
    306315                <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th>
    307                 <td><?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?></td>
     316                <td>
     317                    <?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" aria-describedby="fileupload-maxk-desc" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?>
     318                    <p class="screen-reader-text" id="fileupload-maxk-desc">
     319                        <?php _e( 'Size in kilobytes' ) ?>
     320                    </p>
     321                </td>
    308322            </tr>
    309323        </table>
     
    364378             */
    365379            $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
     380            $fieldset_end = '';
     381            if ( count( (array) $menu_items ) > 1 ) {
     382                echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
     383                $fieldset_end = '</fieldset>';
     384            }
    366385            foreach ( (array) $menu_items as $key => $val ) {
    367386                echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>";
    368387            }
     388            echo $fieldset_end;
    369389            ?>
    370390                </td>
  • trunk/src/wp-admin/network/site-info.php

    r31156 r31517  
    125125    <table class="form-table">
    126126        <tr class="form-field form-required">
    127             <th scope="row"><?php _e( 'Domain' ) ?></th>
    128127            <?php if ( $is_main_site ) { ?>
     128                <th scope="row"><?php _e( 'Domain' ) ?></th>
    129129                <td><code><?php echo $parsed['scheme'] . '://' . esc_attr( $details->domain ) ?></code></td>
    130130            <?php } else { ?>
     131                <th scope="row"><label for="domain"><?php _e( 'Domain' ) ?></label></th>
    131132                <td><?php echo $parsed['scheme'] . '://'; ?><input name="blog[domain]" type="text" id="domain" value="<?php echo esc_attr( $details->domain ) ?>" /></td>
    132133            <?php } ?>
    133134        </tr>
    134135        <tr class="form-field form-required">
     136            <?php if ( $is_main_site ) { ?>
    135137            <th scope="row"><?php _e( 'Path' ) ?></th>
    136             <?php if ( $is_main_site ) { ?>
    137138            <td><code><?php echo esc_attr( $details->path ) ?></code></td>
    138139            <?php
     
    140141                switch_to_blog( $id );
    141142            ?>
     143            <th scope="row"><label for="path"><?php _e( 'Path' ) ?></label></th>
    142144            <td>
    143145                <input name="blog[path]" type="text" id="path" value="<?php echo esc_attr( $details->path ) ?>" /><br />
    144                 <label><input type="checkbox" name="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>
     146                <input type="checkbox" name="update_home_url" id="update_home_url" value="update" <?php if ( get_option( 'siteurl' ) == untrailingslashit( get_blogaddress_by_id ($id ) ) || get_option( 'home' ) == untrailingslashit( get_blogaddress_by_id( $id ) ) ) echo 'checked="checked"'; ?> /> <label for="update_home_url"><?php _e( 'Update <code>siteurl</code> and <code>home</code> as well.' ); ?></label>
    145147            </td>
    146148            <?php
     
    149151        </tr>
    150152        <tr class="form-field">
    151             <th scope="row"><?php _ex( 'Registered', 'site' ) ?></th>
     153            <th scope="row"><label for="blog_registered"><?php _ex( 'Registered', 'site' ) ?></label></th>
    152154            <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" /></td>
    153155        </tr>
    154156        <tr class="form-field">
    155             <th scope="row"><?php _e( 'Last Updated' ); ?></th>
     157            <th scope="row"><label for="blog_last_updated"><?php _e( 'Last Updated' ); ?></label></th>
    156158            <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" /></td>
    157159        </tr>
     
    168170            <th scope="row"><?php _e( 'Attributes' ); ?></th>
    169171            <td>
     172            <fieldset>
     173            <legend class="screen-reader-text"><?php _e( 'Set site attributes' ) ?></legend>
    170174            <?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
    171175                <label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); disabled( ! in_array( $details->$field_key, array( 0, 1 ) ) ); ?> />
    172176                <?php echo $field_label; ?></label><br/>
    173177            <?php endforeach; ?>
     178            <fieldset>
    174179            </td>
    175180        </tr>
  • trunk/src/wp-admin/network/site-new.php

    r30578 r31517  
    128128    <table class="form-table">
    129129        <tr class="form-field form-required">
    130             <th scope="row"><?php _e( 'Site Address' ) ?></th>
     130            <th scope="row"><label for="site-address"><?php _e( 'Site Address' ) ?></label></th>
    131131            <td>
    132132            <?php if ( is_subdomain_install() ) { ?>
    133                 <input name="blog[domain]" type="text" class="regular-text" id="site-address" title="<?php esc_attr_e( 'Domain' ) ?>"/><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
     133                <input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" /><span class="no-break">.<?php echo preg_replace( '|^www\.|', '', $current_site->domain ); ?></span>
    134134            <?php } else {
    135                 echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" id="site-address" type="text" title="<?php esc_attr_e( 'Domain' ) ?>"/>
     135                echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" class="regular-text" id="site-address" aria-describedby="site-address-desc" />
    136136            <?php }
    137             echo '<p>' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
     137            echo '<p id="site-address-desc">' . __( 'Only lowercase letters (a-z) and numbers are allowed.' ) . '</p>';
    138138            ?>
    139139            </td>
    140140        </tr>
    141141        <tr class="form-field form-required">
    142             <th scope="row"><?php _e( 'Site Title' ) ?></th>
    143             <td><input name="blog[title]" type="text" class="regular-text" id="site-title" title="<?php esc_attr_e( 'Title' ) ?>"/></td>
     142            <th scope="row"><label for="site-title"><?php _e( 'Site Title' ) ?></label></th>
     143            <td><input name="blog[title]" type="text" class="regular-text" id="site-title" /></td>
    144144        </tr>
    145145        <tr class="form-field form-required">
    146             <th scope="row"><?php _e( 'Admin Email' ) ?></th>
    147             <td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" title="<?php esc_attr_e( 'Email' ) ?>"/></td>
     146            <th scope="row"><label for="admin-email"><?php _e( 'Admin Email' ) ?></label></td>
     147            <td><input name="blog[email]" type="email" class="regular-text wp-suggest-user" id="admin-email" data-autocomplete-type="search" data-autocomplete-field="user_email" /></td>
    148148        </tr>
    149149        <tr class="form-field">
  • trunk/src/wp-admin/network/site-settings.php

    r28712 r31517  
    139139            ?>
    140140                <tr class="form-field">
    141                     <th scope="row"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></th>
     141                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo ucwords( str_replace( "_", " ", $option->option_name ) ) ?></label></th>
    142142                    <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ) ?>]" id="<?php echo esc_attr( $option->option_name ) ?>"<?php disabled( $disabled ) ?>><?php echo esc_textarea( $option->option_value ) ?></textarea></td>
    143143                </tr>
     
    146146            ?>
    147147                <tr class="form-field">
    148                     <th scope="row"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></th>
     148                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ) ?>"><?php echo esc_html( ucwords( str_replace( "_", " ", $option->option_name ) ) ); ?></label></th>
    149149                    <?php if ( $is_main_site && in_array( $option->option_name, array( 'siteurl', 'home' ) ) ) { ?>
    150150                    <td><code><?php echo esc_html( $option->option_value ) ?></code></td>
  • 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>
  • trunk/src/wp-admin/network/user-new.php

    r29966 r31517  
    8888    <table class="form-table">
    8989        <tr class="form-field form-required">
    90             <th scope="row"><?php _e( 'Username' ) ?></th>
    91             <td><input type="text" class="regular-text" name="user[username]" /></td>
     90            <th scope="row"><label for="username"><?php _e( 'Username' ) ?></label></th>
     91            <td><input type="text" class="regular-text" name="user[username]" id="username" /></td>
    9292        </tr>
    9393        <tr class="form-field form-required">
    94             <th scope="row"><?php _e( 'Email' ) ?></th>
    95             <td><input type="text" class="regular-text" name="user[email]" /></td>
     94            <th scope="row"><label for="email"><?php _e( 'Email' ) ?></label></th>
     95            <td><input type="text" class="regular-text" name="user[email]" id="email"/></td>
    9696        </tr>
    9797        <tr class="form-field">
  • trunk/src/wp-admin/network/users.php

    r31200 r31517  
    5252                    if ( is_array( $blog_users ) && !empty( $blog_users ) ) {
    5353                        $user_site = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
    54                         $user_dropdown = "<select name='blog[$user_id][$key]'>";
     54                        $user_dropdown = '<label for="reassign_user" class="screen-reader-text">' . __( 'Select a user' ) . '</label>';
     55                        $user_dropdown .= "<select name='blog[$user_id][$key]' id='reassign_user'>";
    5556                        $user_list = '';
    5657                        foreach ( $blog_users as $user ) {
     
    6869                            <?php _e( 'Delete all content.' ); ?></label></li>
    6970                            <li><label><input type="radio" id="delete_option1" name="delete[<?php echo $details->userblog_id . '][' . $delete_user->ID ?>]" value="reassign" />
    70                             <?php echo __( 'Attribute all content to:' ) . '</label>' . $user_dropdown; ?></li>
     71                            <?php echo __( 'Attribute all content to:' ) . "</label>\n" . $user_dropdown; ?></li>
    7172                        </ul>
    7273                        <?php
Note: See TracChangeset for help on using the changeset viewer.