Make WordPress Core


Ignore:
Timestamp:
06/21/2023 01:52:16 AM (3 years ago)
Author:
joedolson
Message:

Administration: Make checkbox column clickable.

Change the label for .check-column inside list tables to a block filling the entire cell. Improves accessibility by increasing the target area for the control.

Props mitchoyoshitaka, lessbloat, sabernhardt, ogleker, tacoverdo, joostdevalk, karmatosed.

Fixes #21516.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r55911 r55954  
    10131013                if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
    10141014                        ?>
    1015                         <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>">
     1015                        <label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>">
     1016                                <span class="screen-reader-text">
    10161017                                <?php
    10171018                                        /* translators: %s: Post title. */
    10181019                                        printf( __( 'Select %s' ), _draft_or_post_title() );
    10191020                                ?>
     1021                                </span>
    10201022                        </label>
    10211023                        <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
Note: See TracChangeset for help on using the changeset viewer.