[wp-trac] [WordPress Trac] #62548: Move checkbox input outside of the wrapping `label` element. (was: Redundant "for" in wp-admin dashboard)

WordPress Trac noreply at wordpress.org
Tue Dec 3 15:27:58 UTC 2024


#62548: Move checkbox input outside of the wrapping `label` element.
----------------------------+----------------------------
 Reporter:  kkmuffme        |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  6.8
Component:  Administration  |     Version:
 Severity:  trivial         |  Resolution:
 Keywords:  has-patch       |     Focuses:  accessibility
----------------------------+----------------------------
Description changed by joedolson:

Old description:

> {{{
> <label for="dashboard_right_now-hide">
>         <input class="hide-postbox-tog" name="dashboard_right_now-hide"
> type="checkbox" id="dashboard_right_now-hide"
> value="dashboard_right_now"/>At a Glance
> </label>
> }}}
>
> The `for=` is redundant and can be removed, since the input is wrapped in
> the label
> There are a couple other ones there with the same issue

New description:

 [Edited to change the intent of the ticket. Original intent below.]

 {{{
 <label for="dashboard_right_now-hide">
         <input class="hide-postbox-tog" name="dashboard_right_now-hide"
 type="checkbox" id="dashboard_right_now-hide"
 value="dashboard_right_now"/>At a Glance
 </label>
 }}}

 The `for=` is redundant and can be removed, since the input is wrapped in
 the label
 There are a couple other ones there with the same issue

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62548#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list