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

    r55732 r55954  
    513513                $checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
    514514                ?>
    515                 <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
    516                 <label class="screen-reader-text" for="<?php echo $checkbox_id; ?>" >
     515                <label class="label-covers-full-cell" for="<?php echo $checkbox_id; ?>" >
     516                        <span class="screen-reader-text">
    517517                        <?php
    518518                        printf(
    … …  
    522522                        );
    523523                        ?>
     524                        </span>
    524525                </label>
     526                <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
    525527                <?php
    526528        }
Note: See TracChangeset for help on using the changeset viewer.