W3C home > Mailing lists > Public > www-validator@w3.org > October 2013

Re: The label element may contain at most one input, button, select, textarea, or keygen descendant.

From: Felix E. Klee <felix.klee@inka.de>
Date: Tue, 1 Oct 2013 10:07:17 +0200
Message-ID: <CA+m_8J191Xdjt38DM8KQfzB4Ya6GKsLM0gUhKVaiX3-7qbxbXA@mail.gmail.com>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: www-validator@w3.org
Thanks for clarification, Yucca!

On Tue, Oct 1, 2013 at 9:55 AM, Jukka K. Korpela <jkorpela@cs.tut.fi>
wrote:
> The construct
>
>
>         <label>
>           <input type="radio" />
>           <input type="text" />
>         </label>
>
> would be rather odd, in addition to being invalid; the error
> processing rule means that the radio button is the labeled control and
> the text input control is its label!

I don't want to argue, but: Lists or collections of radio buttons
sometimes have a free-form option, in addition to predefined options.

On Tue, Oct 1, 2013 at 9:55 AM, Jukka K. Korpela <jkorpela@cs.tut.fi> wrote:
> 2013-10-01 10:36, Felix E. Klee wrote:
>
>> That's what the validator says for:
>
>
> You mean that the validator says "The label element may contain at most one
> input, button, select,  textarea, or keygen descendant." (In future, please
> make e-mail message content self-contained, without implying the Subject
> line.)
>
>
>> However, the HTML5 W3C Candidate Recommendation 6 August 2013
>> [suggests][1] that multiple input ("labelable") elements are OK:
>>
>>> If the for attribute is not specified, but the label element has a
>>> labelable element descendant, then the first such descendant in tree
>>> order is the label element's labeled control.
>
>
> It does not say they are OK. It just defines what happens if they are used.
> This is an error processing rule, since the definition of the element says
> (under "Content model") that the content shall be "Phrasing content, but
> with no descendant labelable elements unless it is the element's labeled
> control, and no descendant label elements."
>
> Perhaps the formulation could be better, but the intended meaning is that
> the content may contain at most one labelable element.
>
> The construct
>
>
>         <label>
>           <input type="radio" />
>           <input type="text" />
>         </label>
>
> would be rather odd, in addition to being invalid; the error processing rule
> means that the radio button is the labeled control and the text input
> control is its label!
>
> Yucca
>
>



-- 
Dipl.-Phys. Felix E. Klee
Mobile: +34.605.294254
Mobile: +49.174.1386060
Fax: +49.3212.1021049
Received on Tuesday, 1 October 2013 08:08:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:09 UTC