Make WordPress Core


Ignore:
Timestamp:
09/22/2023 07:56:48 PM (21 months ago)
Author:
joedolson
Message:

Administration: Switch order of label/checkbox in WP_List_Table.

Move the label after the checkbox in WP_List_Table instances. Resolve a false positive that will be presented by automated accessibility testing tools. Follow up to [55954].

Props dimitrism, joedolson, sabernhardt, oglekler, marybaum, tobiasbg.
Fixes #58703.

File:
1 edited

Legend:

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

    r56586 r56665  
    420420        if ( current_user_can( 'edit_post', $post->ID ) ) {
    421421            ?>
    422             <label class="label-covers-full-cell" for="cb-select-<?php echo $post->ID; ?>">
     422            <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
     423            <label for="cb-select-<?php echo $post->ID; ?>">
    423424                <span class="screen-reader-text">
    424425                <?php
     
    428429                </span>
    429430            </label>
    430             <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
    431431            <?php
    432432        }
Note: See TracChangeset for help on using the changeset viewer.