Closed Bug 378078 Opened 17 years ago Closed 17 years ago

<label> should work with other things than simple text

Categories

(Firefox :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: thuejk, Unassigned)

Details

Attachments

(1 file)

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.
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
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: