News for hackers. Stuff that matters.
Re:Why Your Form Checkboxes Need to Have Label Tags by timdorr on Sunday June 19, 2011 @01:22AM (#2670245)
This is the single most annoying thing I find web devs doing on a regular basis. Please use labels, web devs. It applies not only to checkboxes but any type of input. It's a free, easy usability improvement. It even makes it easier to style the text with CSS since it's wrapped in a specific tag!
Re:Why Your Form Checkboxes Need to Have Label Tags by masklinn on Sunday June 19, 2011 @04:24AM (#2670530)
> It even makes it easier to style the text with CSS since it's wrapped in a specific tag!

Labels don't have to wrap inputs. In fact, mine almost never do, that's too much of a pain to align. They're usually linked to their input via @for (and at some point in the future, I'll be able to do that with inputs and forms via @form, what a glorious day that will be)

Re:Why Your Form Checkboxes Need to Have Label Tags by freakwit on Sunday June 19, 2011 @04:46AM (#2670568)
I think in this case "the text" refers to the label's text, not the text in the input that the label is @for.
Re:Why Your Form Checkboxes Need to Have Label Tags by masklinn on Sunday June 19, 2011 @04:53AM (#2670576)
Oh ok, missed that. Sorry.
Re:Why Your Form Checkboxes Need to Have Label Tags by ivanbernat on Sunday June 19, 2011 @04:14AM (#2670521)
Agreed, however I think the problem lies with most tutorials out there which don't follow this logic and newbie devs just follow this path without thinking about it.
Re:Why Your Form Checkboxes Need to Have Label Tags by ajtaylor on Sunday June 19, 2011 @07:11AM (#2670695)
I have used labels in the past for radio buttons and checkboxes, but had never considered them before for input-type elements. It's a brilliant idea, and so easy to implement too!