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

    r20198 r21317  
    664664        else
    665665            $current_order = 'asc';
     666
     667        if ( ! empty( $columns['cb'] ) ) {
     668            static $cb_counter = 1;
     669            $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' )
     670                . '</label><input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
     671            $cb_counter++;
     672        }
    666673
    667674        foreach ( $columns as $column_key => $column_display_name ) {
Note: See TracChangeset for help on using the changeset viewer.