WordPress.org

Make WordPress Core


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