Hi Paul, An interesting question.
I'd go with b. The label is almost, but not quite, redundant when presented with in a simple search form. I'd advise against method a. A confusion of goals takes place. The label is explicitly associated via the for attribute to the search field, but implicitly associated by position to the submit button. That breaks the original WCAG guidelines priority 2 parts 10.2 and 12.4 Regards Mike Foskett -----Original Message----- From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] On Behalf Of Paul Novitski Sent: 17 February 2010 19:25 To: wsg@webstandardsgroup.org Subject: Re: [WSG] Minimal forms or marking up a search field >A practical distraction for the standardistas and accessibility gurus� > >Hoping tap your brain for an alternative perspective on the simple and >common HTML scenario of a site search form. ... To revisit this topic, I'm considering the following and would appreciate feedback: _________________________ a) Submit button as label: <form ...> <div> <input type="text" id="search" name="search" /> <label for="search"> <input type="submit" value="Search" /> </label> </div> </form> _________________________ b) Label hidden from view: <form ...> <div> <label for="search" id="search-label">Search:</label> <input type="text" id="search" name="search" /> <input type="submit" value="Search" /> </div> </form> label#search-label { position: absolute; left: -1000em; } _________________________ The rationale for both of these is that the "Search" submit button serves as a clear and unambiguous label for the input field. In listing a) the button is literally the label; in b) there is a separate literal label present in the markup but hidden from cosmetic view. Both validate for W3C HTML & Cynthia 528 & Accessibilty. Can you see any problems with them? I favor a) but it feels edgy. Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: memberh...@webstandardsgroup.org ******************************************************************* This is a confidential email. Tesco may monitor and record all emails. The views expressed in this email are those of the sender and not Tesco. Tesco Stores Limited Company Number: 519500 Registered in England Registered Office: Tesco House, Delamare Road, Cheshunt, Hertfordshire EN8 9SL VAT Registration Number: GB 220 4302 31 ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: memberh...@webstandardsgroup.org *******************************************************************