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-links-list-table.php

    r19712 r21317  
    130130                switch ( $column_name ) {
    131131                    case 'cb':
    132                         echo '<th scope="row" class="check-column"><input type="checkbox" name="linkcheck[]" value="'. esc_attr( $link->link_id ) .'" /></th>';
     132                        echo '<th scope="row" class="check-column"><label for="cb-select-' . $link->link_id . '" class="screen-reader-text">' . sprintf( __( 'Select %s' ), $link->link_name )
     133                                . '</label><input type="checkbox" name="linkcheck[]" id="cb-select-' . $link->link_id . '" value="'. esc_attr( $link->link_id ) .'" /></th>';
    133134                        break;
    134135
Note: See TracChangeset for help on using the changeset viewer.