Right now, there are no IDs on labels for checkboxes. This makes jQuery effects nearly impossible in many cases. Here's a patch that I'm running on site to allow me to add in various jQuery effects.

CommentFileSizeAuthor
t_14.patch709 bytesm3avrck

Comments

hickory’s picture

Seems like a good idea. Should labels have 'for' attributes as well?

hickory’s picture

Status: Active » Needs review
catch’s picture

still applies with a few hundred lines offset...

robloach’s picture

Status: Needs review » Needs work

If we do it for checkboxes, should we do it for all other form elements that use labels as well? Radio buttons, etc?

robin monks’s picture

Version: 6.x-dev » 7.x-dev
Component: base system » forms system

Sounds like a 7.x feature.

Robin

burningdog’s picture

D7's code looks like this:
<label for="' . $element['#id'] . '">
I don't know enough about jQuery to know if it will work with the 'for', or whether it still needs an element id?

sun’s picture

Status: Needs work » Closed (won't fix)

The 'for' attribute is a sufficient jQuery selector.