WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accessible web forms: default text in edit boxes and text areas

for

From: Jukka K. Korpela
Date: Feb 23, 2005 5:07AM


On Wed, 23 Feb 2005, jim wrote:

> I agree with Ben, that default text is neither needed nor desirable. But
> there is no need to include the input itself in the label element - it
> confuses some screen readers (I have forgotten which):
>
> Search<input type="text" name="search"
> id="search">

On the other hand, for input type="radio" and input type="checkbox",
it is better to put the element inside the element.
This makes the association better known to browsers (including IE) so
that, for example, you can click on the label text to toggle the
radio button or checkbox setting - an important feature to people
with motoric disabilities or a poor mouse, since the radion button
or checkbox is fairly small.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/