W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2002

Re: Proper Coding for Yes/No Questions

From: <kynn-eda@idyllmtn.com>
Date: Wed, 6 Mar 2002 04:34:04 -0800 (PST)
Message-Id: <200203061234.EAA16634@garth.idyllmtn.com>
To: jukka.korpela@tieke.fi (Jukka Korpela)
Cc: w3c-wai-ig@w3.org ("WAI (E-mail)")
Jukka wrote:
> - Include a "dummy" selection, normally as the first item, e.g.
>     <div>
>     <input type="radio" id="smartDunno" value="dunno" name="smart" />
>     <label for="smartDunno">Don't know</label>
>     </div>

Good point. There should _always_ be a default value set (and checked)
for any set of radio buttons, and unless there's an obvious choice 
between the two as to which it should be, a third option like this
should be added.

> Besides, the name attribute value must be the same for all radio buttons
> that are to behave as a group, from which exactly one can be selected,
> which is the whole idea of using radio buttons.

Duh, yes, sorry. Good catch.

> But, alas, it seems that by using that simpler, more natural approach,
> important accessibility enhancements are missed. 

Yeah, browsers suck. :)

> Thus, my suggestion is:
> [snip]

Yep, that looks great! I am not entirely sure about the <div>, although
I could always use CSS to place those wherever I want them, even on the
same line, if the extra lines are bothering me.

Received on Wednesday, 6 March 2002 07:26:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:07 UTC