Click on "Select all items on this page" checkbox label does not affect checkbox: missing "for" html attribute

Created on 5 March 2012, over 12 years ago
Updated 21 September 2023, 9 months ago

labels related to checkboxed should be associated to them. i just came across this when clicking on the "Select all items on this page" label didn't mark the checkbox as selected.

if possible we would need a unique id for the checkbox and set the "for" attribute of the label accordingly.
another option is to put the checkbox inside the label element.
http://www.456bereastreet.com/archive/200711/use_the_label_element_to_ma...

πŸ› Bug report
Status

Needs review

Version

3.0

Component

User interface

Created by

πŸ‡¨πŸ‡­Switzerland dasjo Zurich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dmundra Eugene, OR

    @alex-bukach I believe you addition does work but no label is automatically added to the checkbox. I am actually solving a different problem which is that the lack of the label is an accessibility issue. So I think we should combine your solution with

  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dmundra Eugene, OR

    I created a related issue https://www.drupal.org/project/views_bulk_operations/issues/3388986 πŸ› Missing labels for checkboxes and selecting operation Active that tackles the missing labels. Maybe that should include the unique ID solution from here?

Production build 0.69.0 2024