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

    r56611 r56665  
    10351035        if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
    10361036            ?>
    1037             <label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>">
     1037            <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
     1038            <label for="cb-select-<?php the_ID(); ?>">
    10381039                <span class="screen-reader-text">
    10391040                <?php
     
    10431044                </span>
    10441045            </label>
    1045             <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
    10461046            <div class="locked-indicator">
    10471047                <span class="locked-indicator-icon" aria-hidden="true"></span>
Note: See TracChangeset for help on using the changeset viewer.