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

    r56586 r56665  
    421421            $blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
    422422            ?>
    423             <label class="label-covers-full-cell" for="blog_<?php echo $blog['blog_id']; ?>">
     423            <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
     424            <label for="blog_<?php echo $blog['blog_id']; ?>">
    424425                <span class="screen-reader-text">
    425426                <?php
     
    429430                </span>
    430431            </label>
    431             <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]"
    432                 value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
    433432            <?php
    434433        endif;
Note: See TracChangeset for help on using the changeset viewer.