WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/24/2012 06:01:22 PM (8 years ago)
Author:
ryan
Message:

Add screen reader text to checkboxes in list tables. Props MikeLittle, nacin. see #21325

File:
1 edited

Legend:

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

    r19712 r21317  
    257257
    258258            // Set up the checkbox ( because the user is editable, otherwise its empty )
    259             $checkbox = "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
     259            $checkbox = '<label for="cb-select-' . $user_object->ID . '" class="screen-reader-text">' . sprintf( __( 'Select %s' ), $user_object->user_login )
     260                        . "</label><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";
    260261
    261262        } else {
Note: See TracChangeset for help on using the changeset viewer.