RE: label tag question

chaarls wrote:

> Has anyone actually tested having the submit button inside a 
> label element  
> to perform the function of a label? Or is it not valid code? (I am  
> thinking out loud, because I haven't got the spec in front of me)

it validates OK through W3C validator

Testing using with HPR 3.0 and Jaws 4.51, neither seem to recognise the
submit button value as label text.
code:
<input type="text" id="t1" /><label for="t1"><input type="submit"
value="search" /></label> 


suggest that an alternative would be to add a title to the text input.
this is interpreted and announced as label text by HPR and JAWS.
code:
<input type="text" title="search for" />


with regards

Steven Faulkner
Web Accessibility Consultant
National Information & Library Service (NILS)
454 Glenferrie Road
Kooyong Victoria 3144
Phone: (613) 9864 9281
Fax: (613) 9864 9210
Email: steven.faulkner@nils.org.au

National Information Library Service
A subsidiary of RBS.RVIB.VAF Ltd.


> -----Original Message-----
> From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org]On
> Behalf Of Charles McCathieNevile
> Sent: Thursday, 31 March 2005 11:42 AM
> To: Patrick H. Lauke; w3c-wai-ig@w3.org
> Subject: Re: label tag question
> 
> 
> 
> On Thu, 31 Mar 2005 05:40:43 +1000, Patrick H. Lauke  
> <redux@splintered.co.uk> wrote:
> 
> > Kim had written
> >> To comply with Section 508, does the textbox need to be 
> associated with  
> >> the button?
> 
> >  Unfortunately, that's not directly possible.
> 
> Has anyone actually tested having the submit button inside a 
> label element  
> to perform the function of a label? Or is it not valid code? (I am  
> thinking out loud, because I haven't got the spec in front of me)
> 
> > However, I'd suggest something like
> 
> >  <form action="..." method="...">
> >     <label for="searchterm">Search for:</label>
> >     <input type="text" name="q" id="searchterm" value="" />
> >     <input type="submit" value="search" />
> > </form>
> 
> >  and use CSS to hide the label (unless I'm mistaken, even 
> hiding it via  
> > CSS still retains the necessary association used by AT such as  
> > screenreaders)
> 
> When Joe Clark did some testing of this question he found out what
some  
> people had been saying was true. You are at least somewhat mistaken,
in  
> that many techniques for hiding stuff with CSS hide it from assistive

> technologies as well. I believe that the technique of putting things
in  
> some position that doesn't appear on screen (such as 1000 em to the
left  
> of the left margin) means assistive technologies pick it up, but it
can  
> get somewhat confusing for visual users relying on keyboard 
> navigation if  
> their focus simply vanishes.
> 
> Mr Foliot (hello, Mr Foliot :-) said (and I quote)
> 
> ..."(although I'm sure there would be at least one voice which 
> would argue  
> that it should be visible to all users...)"...
> 
> Mine is just such a voice. Although the close proximity of a button  
> labelled search will do it for most users, clear labelling is a great

> thing. Please leave the label visible.
> 
> cheers
> 
> Chaals
> 
> -- 
> Charles McCathieNevile                      Fundacion Sidar
> charles@sidar.org   +61 409 134 136    http://www.sidar.org
> 


__________________________________________________________________
<< ella for Spam Control >> has removed Spam messages and set aside Later
for me
You can use it too - and it's FREE!  http://www.ellaforspam.com

Received on Thursday, 31 March 2005 02:10:00 UTC