E-mail List Archives
Thread: Accessible web forms: default text in edit boxes and text areas
Number of posts in this thread: 2 (In chronological order)
"jkorpela" < = EMAIL ADDRESS REMOVED = > wrote
on 23/02/2005 12:07:18:
> On the other hand, for input type="radio" and input type="checkbox",
> it is better to put the <input> element inside the <label>
> This makes the association better known to browsers (including IE)
> 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.
Does IE ignore the "for" attribute, then?
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
Institute of Physics
Registered charity No. 293851
76 Portland Place, London, W1B 1NT, England
IOP Publishing Limited
Registered in England under Registration No 467514.
Registered Office: Dirac House, Temple Back, Bristol BS1 6BE England
This e-mail message has been checked for the presence of computer viruses.
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
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/