Make WordPress Core


Ignore:
Timestamp:
06/21/2023 01:52:16 AM (20 months 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/update-core.php

    r55917 r55954  
    572572        <td class="check-column">
    573573            <?php if ( $compatible_php ) : ?>
    574                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    575                 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">
     574                <label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
     575                    <span class="screen-reader-text">
    576576                    <?php
    577577                    /* translators: Hidden accessibility text. %s: Plugin name. */
    578578                    printf( __( 'Select %s' ), $plugin_data->Name );
    579579                    ?>
     580                    </span>
    580581                </label>
     582                <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $plugin_file ); ?>" />
    581583            <?php endif; ?>
    582584        </td>
     
    746748        <td class="check-column">
    747749            <?php if ( $compatible_wp && $compatible_php ) : ?>
    748                 <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    749                 <label for="<?php echo $checkbox_id; ?>" class="screen-reader-text">
     750                <label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
     751                    <span class="screen-reader-text">
    750752                    <?php
    751753                    /* translators: Hidden accessibility text. %s: Theme name. */
    752754                    printf( __( 'Select %s' ), $theme->display( 'Name' ) );
    753755                    ?>
     756                    </span>
    754757                </label>
     758                <input type="checkbox" name="checked[]" id="<?php echo $checkbox_id; ?>" value="<?php echo esc_attr( $stylesheet ); ?>" />
    755759            <?php endif; ?>
    756760        </td>
Note: See TracChangeset for help on using the changeset viewer.