Make WordPress Core

Ticket #21325: 21325.2.diff

File 21325.2.diff, 3.1 KB (added by nacin, 13 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

     
    492492
    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;
    498501
  • wp-admin/includes/class-wp-terms-list-table.php

     
    236236                $default_term = get_option( 'default_' . $taxonomy );
    237237
    238238                if ( current_user_can( $tax->cap->delete_terms ) && $tag->term_id != $default_term )
    239                         return '<input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" />';
    240                 else
    241                         return '&nbsp;';
     239                        return '<label for="cb-select-' . $tag->term_id . '" class="screen-reader-text">' . sprintf( __( 'Select %s' ), $tag->name )
     240                                . '</label><input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" id="cb-select-' . $tag->term_id . '" />';
     241
     242                return '&nbsp;';
    242243        }
    243244
    244245        function column_name( $tag ) {
  • wp-admin/includes/class-wp-list-table.php

     
    664664                else
    665665                        $current_order = 'asc';
    666666
     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                }
     673
    667674                foreach ( $columns as $column_key => $column_display_name ) {
    668675                        $class = array( 'manage-column', "column-$column_key" );
    669676
  • wp-admin/includes/class-wp-comments-list-table.php

     
    317317        }
    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
    324326        function column_comment( $comment ) {