Make WordPress Core


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

    r56549 r56665  
    14041404                if ( ! empty( $columns['cb'] ) ) {
    14051405                        static $cb_counter = 1;
    1406                         $columns['cb']     = '<label class="label-covers-full-cell" for="cb-select-all-' . $cb_counter . '">' .
     1406                        $columns['cb']     = '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />
     1407                        <label for="cb-select-all-' . $cb_counter . '">' .
    14071408                                '<span class="screen-reader-text">' .
    14081409                                        /* translators: Hidden accessibility text. */
    14091410                                        __( 'Select All' ) .
    14101411                                '</span>' .
    1411                                 '</label>' .
    1412                                 '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
     1412                                '</label>';
    14131413                        ++$cb_counter;
    14141414                }
Note: See TracChangeset for help on using the changeset viewer.