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/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 )
Note: See TracChangeset for help on using the changeset viewer.