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

    r56586 r56665  
    897897        if ( $this->user_can ) {
    898898            ?>
    899         <label class="label-covers-full-cell" for="cb-select-<?php echo $comment->comment_ID; ?>">
     899        <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
     900        <label for="cb-select-<?php echo $comment->comment_ID; ?>">
    900901            <span class="screen-reader-text">
    901902            <?php
     
    905906            </span>
    906907        </label>
    907         <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
    908908            <?php
    909909        }
Note: See TracChangeset for help on using the changeset viewer.