WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: Jim Thatcher
Date: Feb 23, 2005 7:12AM


Opera 7.54, Mozilla 0.9.3 and Netscape 7.2 all have the same behavior for
radio buttons, check boxes and text input WHETHER or NOT the label encloses
the control in addition to the prompting text. Only IE's behavior is strange
- when the label element contains the control, the focus rectangle includes
the control (for radio buttons and checkboxes) and if the label does not
contain the control, the focus rectangle does not include the control.

It is overkill to use both the for attribute and to enclose the control in
the label element. There is no good reason for doing both.

Jim

Accessibility Consulting: http://jimthatcher.com/
512-306-0931

-----Original Message-----
From: morrison.ben [mailto: <EMAIL REMOVED> ]
Sent: Wednesday, February 23, 2005 7:32 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] Accessible web forms: default text in edit boxes and
text areas



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.

after v quick testing works in IE6

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