[whatwg] Proposal: Allow block content inside label element

I have a weak feeling against this proposition.  Not that I think it would
harm very much, it just seems not very appropriate.
>From the behavioral point of view: The purpose of a LABEL control is to
redirect focus on click.  It does not make much sense with a TEXTAREA
control that is usually big enough to click upon.  
>From a semantic point of view: the TEXTAREA control is special because it
does not make sense to ask whether the content of the TEXTAREA is or even
contains some fixed text because the user may express the same meaning with
different words; its content may be stored but you have to use advanced text
analysis tools (such as a human reader) to process it if you need to.  You
can use a label to define what you expect the user to enter into the
control; the TEXTAREA control is so special that it seems obvious that it
needs a caption or some introductory explanation, not a label (except for
the labels "Your message" and "Your text", which are possible but not very
informative indeed.)
Best regards,
Chris

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Brad Fults
Sent: Tuesday, May 08, 2007 5:47 AM
To: WHAT-WG
Subject: [whatwg] Proposal: Allow block content inside label element

Currently, as far as I can tell, in HTML 4 [1] and HTML 5 [2], the
label element is defined as having inline content. When using the
implicit form control association pattern described in the HTML 4 spec
(e.g. a form control inside of the label element instead of or in
addition to using the |for| attribute), this becomes a problem.

Specifically, if one tries to place a textarea element inside of a
label element, modern browsers will insert the textarea as a later
sibling to the label in the DOM instead of as a child. This seems to
be due to the fact that the textarea is a block element and that label
can't contain it according to the spec.

Could we remedy this by allowing block content inside of a label element?

Thanks.

[1] - http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL
[2] -
http://www.whatwg.org/specs/web-apps/current-work/multipage/section-forms.ht
ml#the-label

-- 
Brad Fults

Received on Tuesday, 8 May 2007 02:06:35 UTC