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

2013-10-01 11:07, Felix E. Klee wrote:

> 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.

You can have such an option, though it will be parallel to a group of 
radio buttons rather than part of it. The point is, anyway, that the 
free text input field is not a label for a radio button. Rather, you 
would have (after normal radio buttons) something like

<input id="other" type="radio" ...>
<label for="other">Other</label>,
<label for="custom">please specify:</label>
<input id="custom" type="text" ...>

Yucca

Received on Tuesday, 1 October 2013 09:53:46 UTC