- From: Jim Thatcher <jim@jimthatcher.com>
- Date: Sat, 20 Apr 2002 12:41:39 -0500
- To: David Woolley <david@djwhome.demon.co.uk>, w3c-wai-ig@w3.org
I agree with David that the version with invisible text is not a good idea. The agreement ends there. If you use LABEL as a container for the INPUT element as well as the text, then screen readers will ignore it. So don't do that. The only case where the LABEL as a container is legal HTML is the situation where screen readers pick up the prompt without any mark up by the author so it is not worth the bother. "Enter Year" is a perfect use of title on an input element whose contents is supposed to be the year. But considering unnecessary noise with a screen reader I would just use "Year." In your example where part of the text could be used for one input element and the other part for another is a great use of the label element. Usually that does not work, like Zip Code with two fields, and Phone Number with three entry fields. Jim Accessibility Consulting http://jimthatcher.com 512-306-0931 Constructing Accessible Web Sites, is now available at Amazon: http://www.amazon.com/exec/obidos/ASIN/1904151000/jimthatcherco-20/! I recommend it. It's a good book! -----Original Message----- From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org]On Behalf Of David Woolley Sent: Friday, April 19, 2002 5:26 PM To: w3c-wai-ig@w3.org Subject: Re: Label versus Title > <label for="month">Please enter your birth month and year:</label> <input > type="text" id="month"> <input type="text" id="year" title="Enter year"> This is a misuse of title; an appropriate title might be "year of birth". > <label for="month">Please enter your birth month</label> and <label > for="year">year</label>:<input type="text" id="month"> <input type="text" > id="year"> I don't think "Please enter your" is really part of the label, but otherwise this makes sense. I would say that it benefits all users, so doesn't need to be justified on accessibility grounds. > <label for="month">Please enter your birth month</label> and year:<input > type="text" id="month"><span class="invisibleText"><label for="year">Enter > your birth year</label></span> <input type="text" id="year"> No on two grounds: - you've lost the usability to general users; - this is a misuse of span; the class should be on the label. Also note, that from an HTML point of view, if not a working round broken browsers point of view, the label element should enclose the input element and you will then not need the for parameter (and id can be name). You would then need another element to cause invisibility, but do you really need to suppress helpful information?
Received on Saturday, 20 April 2002 13:42:03 UTC