RE: LABEL and/or TITLE In Forms?

Option 1 should be used when the text is available for the input element.
Option 2 should be used when the text is not available as a prompt for the
input element. There is no reason to use Option 3. Check out
http://jimthatcher.com/webcourse8.htm. Actually there is an option 4 that
works for three major assistive technologies:
Option 4:
What is your favorite color?
<INPUT type="text" name="color" id="color">
Because Screen readers and Home Page Reader will identify the text
immediately to the left (or immediately above) an input element as the
prompt for that input element.

Jim
Accessibility Consulting
There's a new book on Web Accessibility. For information:
http://jimthatcher.com.

-----Original Message-----
From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org]On
Behalf Of Hy Cohen
Sent: Wednesday, March 13, 2002 5:05 PM
To: 'wai-ig list'
Subject: LABEL and/or TITLE In Forms?


Hi Everyone,

We're writing  the HTML code for the forms of our website, and would like
some advice on how to best make the forms accessible.

What is the proper way to code a description for a form field?

Option 1:
<LABEL for="color">What is your favorite color?</LABEL>
<INPUT type="text" name="color"  id="color">

Option 2:
What is your favorite color?
<INPUT type="text" name="color" id="color" title="What is your favorite
color?>

Option 3:
<LABEL for="color">What is your favorite color?</LABEL>
<INPUT type="text" name="color" id="color" title="What is your favorite
color?>

...or something else?

Thanks so much for your help!

Warmly,
Hy
hy@miplet.com



Accessible Activities
P.O. Box 75581
Seattle, WA   98125-0581

Local Voice / Fax:  206-926-0269
Toll-Free Voice / Fax: 1-800-250-2124
_______________________________
Accessible Activities is a 501(c)(3), tax-exempt, charitable, non-profit
organization, incorporated in the State of Washington, USA.

Received on Wednesday, 13 March 2002 20:20:30 UTC