Make WordPress Core


Ignore:
Timestamp:
09/22/2023 07:56:48 PM (20 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-links-list-table.php

    r56586 r56665  
    175175
    176176        ?>
    177         <label class="label-covers-full-cell" for="cb-select-<?php echo $link->link_id; ?>">
     177        <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
     178        <label for="cb-select-<?php echo $link->link_id; ?>">
    178179            <span class="screen-reader-text">
    179180            <?php
     
    183184            </span>
    184185        </label>
    185         <input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
    186186        <?php
    187187    }
Note: See TracChangeset for help on using the changeset viewer.