[whatwg] a few comments to Webforms 2.0 Call For Comments

Olav Junker Kj?r wrote:
>>I recommend that, for HTML documents with the W2 doctype, there 
>>should always be a default option selected, regardless if that default 
>>is specified. Therefore, if none of the radio buttons are set, the
>>first radio button in the group would automatically be set. 
> 
> 
> If gender is required:
> (o) Female
> (o) Male
> 
> If gender is not required:
> (o) Female
> (o) Male
> (o) Not your business
> 
> In both cases is makes good sense that no option is preselected.

    Why? I'm suggesting that the second case be the recommended one, and 
that a specific option be selected by default:

If gender is not required:
(o) Not Specified
(o) Female
(o) Male

    Not to say there isn't a problem with this. If the radio group is 
required, then this might be a problem. How do you define a radio button 
as required NOT to be clicked? I suppose you could do something like 
required="inverse", but that's kind of a hack. You could also simply 
assume that if there's one or more required radio buttons in a group, 
that "inverse" is implied for all radio buttons that don't have 
|required| defined.

    Even if we reject "inverse" (which is probably, in my opinion), what 
do we do about situations where some radio buttons in a group are 
required, while others are not?

> Especially in the first case it might seem rather strange to preselect one
> of the options. Also, in both cases, it makes sense that a selection is
> required for the form to be valid.

    Not always. For instance, many companies collect optional government 
statistics related to gender and race as part of Federal requirements.

> However, it would be really bad UI if it was a valid input not to select
> an option, e.g. if gender was not required in the first example. This is
> bad because it not obvious that it is an option, and because if you select
> an option, you cannot cange your mind and unselect it (apart from
> resetting the whole form).

    Yeah, the whole point of radio buttons is that one option, no less 
and no more, is selected. It's not intended to act as an implicit 
checkbox to indicate you gave an input. If someone can give a use case 
where there needs to be no options selected and there's no other viable 
solution, I'm willing to hear it. Otherwise, the no-option-selected 
scenario needs to be done away with one way or another.

Received on Sunday, 1 August 2004 18:18:17 UTC