WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Explicit Link Between Radio Buttons and "Question" Label?

for

From: Paul Bohman
Date: Feb 12, 2003 11:26AM


The best way is usually to create a fieldset with a legend. Here is a quick
example:

<fieldset>
<legend>Who is your favorite author?</legend>

<input type="radio" name="au" value="jj" id="jj" />
<label for="jj">James Joyce</label>
<br />
<input type="radio" name="au" value="jfc" id="jfc" />
<label for="jfc">James Fennimore Cooper</label>
<br />
<input type="radio" name="au" value="rwe" id="rwe" />
<label for="rwe">Ralph Waldo Emmerson</label>
<br />
<input type="radio" name="auth" value="ja" id="ja" />
<label for="ja">Jane Austin</label>

</fieldset>

Modern screen readers can associate the legend of the fieldset with the
enclosed contents.

Visual browsers put a box around everything inside of the fieldset.

Paul Bohman
Technology Coordinator
WebAIM (Web Accessibility in Mind)
www.webaim.org
Center for Persons with Disabilities
www.cpd.usu.edu
Utah State University
www.usu.edu


-----Original Message-----
From: Hoffman, David [mailto: <EMAIL REMOVED> ]
Sent: Wednesday, February 12, 2003 10:40 AM
To: <EMAIL REMOVED>
Subject: Explicit Link Between Radio Buttons and "Question" Label?


It appears that the HTML standard is lacking a means to explicitly link
radio buttons (and check boxes) to their "question" label. We can use the
<label> tag to link the button or box to its value ("Yes", "No", "Maybe"),
but finding the "question" ("Do you speak English?") for the set of buttons
or controls is left up to screen reader guesswork: try looking above or to
the left. Experience indicates that this guesswork does not always work, and
is often very limiting. Am I missing something here? If I am correct, are
there any plans to correct this deficiency?

Thanks,
David



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/