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
*******************************************************************

Reply via email to