Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #62926


Ignore:
Timestamp:
02/10/2025 09:43:40 PM (18 months ago)
Author:
sabernhardt
Comment:

@joedolson already commented about not removing the attributes on a similar ticket:

in no circumstances should we elect to remove the for attributes so that we only use implicit labeling.

[34991] removed the for attributes from hide-column-tog checkboxes, but it kept them for editor-expand-toggle and wp_welcome_panel-hide checkboxes. Removing the attribute seems to have been unintentional.

Possibly switching to explicit association:

  • #21603 created the menu item bulk select labels with implicit label association (only a few years ago).
  • The entire label area (with a border) is clickable in its current design, and the CSS has selectors for this markup.
     label.bulk-select-button:hover,
     label.bulk-select-button:active,
     label.bulk-select-button:focus-within {
    
  • Few directory plugins target .bulk-select-button, but I think any custom styles that might conflict could use more generic selectors.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62926

    • Property Keywords has-patch 2nd-opinion close added
    • Property Focuses accessibility added
  • Ticket #62926 – Description

    initial v3  
    1 /wp-admin/nav-menus.php
     1`/wp-admin/nav-menus.php`
    22
    33{{{
    44<label class="bulk-select-button" for="bulk-select-switcher-top">
    5                                                                                                                                 <input type="checkbox" id="bulk-select-switcher-top" name="bulk-select-switcher-top" class="bulk-select-switcher">
    6                                                                                                                                 <span class="bulk-select-button-label">Bulk Select</span>
    7                                                                                                                         </label>
     5        <input type="checkbox" id="bulk-select-switcher-top" name="bulk-select-switcher-top" class="bulk-select-switcher">
     6        <span class="bulk-select-button-label">Bulk Select</span>
     7</label>
    88}}}
    99
    10 The for= is redundant since the input is nested in the label and can be removed
     10The `for=` is redundant since the input is nested in the label and can be removed