Techniques for WCAG 2.0

On this page:

-

# G161: Providing a search function to help users find content

## Applicability

All technologies that include forms.

This technique relates to:

- Success Criterion 2.4.5 (Multiple Ways)
  - How to Meet 2.4.5 (Multiple Ways)
  - Understanding Success Criterion 2.4.5 (Multiple Ways)

## Description

Providing a search function that searches your Web pages is a design strategy that offers users a way to find content. Users can locate content by searching for specific words or phrases, without needing to understand or navigate through the structure of the Web site. This can be a quicker or easier way to find content, particularly on large sites.

Some search companies offer sites free access to their search applications. Search engines are available that can be installed on your own server. Some web hosting companies offer search scripts that customers can include on their web pages. Most services also offer paid versions of their tools with more advanced features.

Implementing a search function that will spell-check the terms, include different endings for the terms (stemming), and allow for the use of different terminology (synonyms) will further increase the accessibility of the search function.

The search functionality is added by either including a simple form on the Web page, usually a text field for the search term and a button to trigger the search or by adding a link to a page that includes a search form. The search form itself must be accessible, of course.

Techniques that are used to optimize search engine results for external searches also support internal search engines and make them more effective: use keywords, `META` tags, and an accessible navigation structure. Search sites provide guidance on how to create content that is optimized for search, for instance Microsoft's Guidelines for successful indexing, Creating a Google-friendly site, and Yahoo! Search Content Quality Guidelines.

## Examples

### Example 1: A Shopping Site

A shopping site organizes its products into different categories, such as women's clothes, men's clothes, and children's clothes. These have subcategories, such as tops, pants, shoes, and accessories. Each page also contains a search form. Users can type the product number or product description into the search field and go directly to that product, rather than needing to navigate the product categories to find it.

### Example 2: A Help Center

A Help Center contains thousands of pages of Help information about a company's products. A search form allows users to search just the Help Center pages to find articles that contain the search terms.

## Resources

Resources are for information purposes only, no endorsement implied.

- Searching Your Site

- Bravenet Site Search

- FreeFind

- Google Custom Search Engine

- Microsoft Live Search

- Pico Search

## Related Techniques

- G63: Providing a site map
- G64: Providing a Table of Contents
- G125: Providing links to navigate to related Web pages
- G126: Providing a list of links to all other Web pages

## Tests

### Procedure

1. Check that the Web page contains a search form or a link to a search page

2. Type text into the search form that occurs in the set of Web pages

3. Activate the search

4. Check that the user is taken to a page that contains the search term

5. Check that the user is taken to a page that contains a list of links to pages containing the search term

### Expected Results

- Check #1 is true, and either Check #4 or Check #5 is true.

- Top
- Contents
- Intro
- Previous: Technique G160
- Next: Technique G162