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

    r55949 r55954  
    412412                if ( current_user_can( 'edit_post', $post->ID ) ) {
    413413                        ?>
    414                         <label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>">
     414                        <label class="label-covers-full-cell" for="cb-select-<?php echo $post->ID; ?>">
     415                                <span class="screen-reader-text">
    415416                                <?php
    416417                                /* translators: Hidden accessibility text. %s: Attachment title. */
    417418                                printf( __( 'Select %s' ), _draft_or_post_title() );
    418419                                ?>
     420                                </span>
    419421                        </label>
    420422                        <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
Note: See TracChangeset for help on using the changeset viewer.