W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] native styling for search input boxes

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Wed, 01 Oct 2008 18:29:34 +0100
Message-ID: <48E3B37E.5070305@googlemail.com>
Kristof Zelechovski wrote:
> Please give some examples how the special status of a search field can be
> used by user agents, presentation aside.

Searching is one of the most common user activities on the web.

Designating a field as a search field makes this task easier in two ways:

1. User agents can make it especially easy to locate (e.g. visually 
distinctive magnifying glass icon) and navigate to (e.g. keyboard 
shortcut to take you to the next search form).

2. User agents can provide consistent functionality (e.g. 
autocompletion). Consistent interfaces have a usability bonus.

It's worth thinking about the relative (potential) usability benefits of 
designating a search area (the current ARIA approach with, say, DIV 
ROLE="SEARCH", mentioned by Henri) versus an individual search field 
(the INPUT TYPE="SEARCH" approach). I was initially going to say that 
INPUT TYPE="SEARCH" might fail to make search fields preceding the INPUT 
(for instance, a search category SELECT) easily discoverable and 
navigable. However, a good implementation might set keyboard focus to 
the first field of the next form featuring TYPE="SEARCH" rather than 
just the INPUT in question. But ROLE="SEARCH" could maybe help users:

a) Skip the whole search area.

b) Discovers instructions preceding the FORM.

c) Differentiate forms that have search _and_ other functionality from 
forms that only do search.

Conversely, INPUT TYPE="SEARCH" holds all the cards when it comes to the 
look and feel and functionality of the individual field.

So I'm of two minds. :)

--
Benjamin Hawkes-Lewis
Received on Wednesday, 1 October 2008 10:29:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC