<label> should work with other things than simple text

RESOLVED INVALID

Status

()

--
enhancement
RESOLVED INVALID
12 years ago
12 years ago

People

(Reporter: thuejk, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

It would be very useful if the <label> tag for radios and checkboxes worked when it contained other things than simple text. For example it is reasonable to make a whole div clickable using a label.

The w3c recommendation at http://www.w3.org/TR/html4/interact/forms.html#h-17.9.1 does not say anything about restricting the <label> tag to only work with simple text.

For the purpose I would like to use labels, it would be nice if I could wrap a whole <td></td> in a <label></label>.

See also the test case I will attach in a moment.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
(Reporter)

Comment 1

12 years ago
Created attachment 262166 [details]
A testcase for label around <div>s and <td>s
It doesn't say anything about "simple text" but very nearly the first thing below the anchor you linked to, "(%inline;)* -(LABEL)" says that it may only contain inline elements with the exception of another <label>. If you want to change that, you'll need to do it by joining the HTML Working Group and persuading them to change the spec.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.