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

Re: label tag question

From: Patrick H. Lauke <redux@splintered.co.uk>
Date: Wed, 30 Mar 2005 20:40:43 +0100
Message-ID: <424B00BB.7060306@splintered.co.uk>
To: w3c-wai-ig@w3.org

Beheler Kim wrote:

> To comply with Section 508, does the textbox need to be associated with 
> the button?

Unfortunately, that's not directly possible. 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)

If you're after XHTML1.1, you may also want to wrap the form's content 
in a fieldset or other block level element (and obviously then add extra 
styling to, for instance, suppress the standard border that comes with 
fieldsets)

-- 
Patrick H. Lauke
_____________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
Received on Wednesday, 30 March 2005 19:39:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:19 GMT