Make WordPress Core


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

    r56586 r56665  
    514514        $checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
    515515        ?>
    516         <label class="label-covers-full-cell" for="<?php echo $checkbox_id; ?>" >
     516        <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
     517        <label for="<?php echo $checkbox_id; ?>" >
    517518            <span class="screen-reader-text">
    518519            <?php
     
    525526            </span>
    526527        </label>
    527         <input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
    528528        <?php
    529529    }
Note: See TracChangeset for help on using the changeset viewer.