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

    r20533 r21317  
    318318
    319319    function column_cb( $comment ) {
    320         if ( $this->user_can )
    321             echo "<input type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />";
     320        if ( $this->user_can ) {
     321            echo '<label class="screen-reader-text" for="cb-select-' . $comment->comment_ID . '">' . __( 'Select comment' )
     322                . "</label><input id='cb-select-$comment->comment_ID' type='checkbox' name='delete_comments[]' value='$comment->comment_ID' />";
     323        }
    322324    }
    323325
Note: See TracChangeset for help on using the changeset viewer.