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 6:27AM


On Wed, 23 Feb 2005, tim.beadle wrote:

> Does IE ignore the "for" attribute, then?

More or less, yes.

> I thought that having an adjacent label with a for attribute, and a unique
> id on the form element, was enough to make the label clickable and give
> focus to the form element. The above works in Mozilla-based browsers.

The specifications don't actually mandate any particular behavior; the
"for" attribute specifies just a semantic relationship. The safest way is
to use the "for" attribute _and_ wrap the element inside the
element.

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