Make WordPress Core


Ignore:
Timestamp:
07/24/2012 06:01:22 PM (13 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-posts-list-table.php

    r21311 r21317  
    493493            case 'cb':
    494494            ?>
    495             <th scope="row" class="check-column"><?php if ( $can_edit_post ) { ?><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /><?php } ?></th>
     495            <th scope="row" class="check-column"><?php if ( $can_edit_post ) { ?>
     496            <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title );
     497            ?></label><input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
     498            <?php } ?></th>
    496499            <?php
    497500            break;
Note: See TracChangeset for help on using the changeset viewer.