W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2005

RE: label tag question

From: Jim Thatcher <jim@jimthatcher.com>
Date: Wed, 6 Apr 2005 14:09:53 -0500
To: "'Léonie Watson'" <lw@nomensa.com>, "'Charles McCathieNevile'" <charles@sidar.org>, "'Patrick H. Lauke'" <redux@splintered.co.uk>, <w3c-wai-ig@w3.org>
Message-ID: <004101c53adc$3d50aa80$6501a8c0@jtcom2400>

Léonie Watson wrote:

> The label around the submit button is
> apparently redundant anyway, not least because it provides no label text,
> but also because a screen reader will read the value of the value 
> attribute by default, which in this case has been given as "Search".

Boy do I feel stupid. I didn't look at the code with enough care. 

The situation at http://www.hhs.state.tx.us/business/index.shtml is a
typical search text entry field followed by a "search Button." There is no
text to use as a label. This is a situation for which I advocate using the
title attribute on the text input, title="search". But this site has a label
element around the search button with for="textfield" - I thought Ah-ha
someone is using the button (its value, actually) as a label for the input
field. GREAT idea. I tried it and reported here that neither of the screen
readers worked they way they should, nor HPR.

But where I was stupid is that I didn't look carefully enough. I didn't
notice that the id of the text input field is NOT "textfield"; the id is
"searchstring". So small wonder the screen readers say nothing.

Well I saved the page and corrected the ID on the text entry field to be
"textfield" and tried the screen readers. Jaws and Window-Eyes behave the
same way - they don't pick up the value of the search button as I had hoped
they would. HPR recognized that the label for the text field was the search
button and said "search submit button text". Yuk. Disappointing even when
coded correctly.

So I am back to recomending: use the title attribute!

Accessibility Consulting: http://jimthatcher.com/
Received on Wednesday, 6 April 2005 19:12:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:31 UTC