RE: label tag question

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!

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

Received on Wednesday, 6 April 2005 19:12:00 UTC