Search

The follow specifications detail how the components of a search widget and results page function. These are the building blocks needed to create any search experience for the SAMHSA websites. This specification will be updated with content type and taxonomy once those decisions have been made for SAMHSA’s global search to serve as an example implimentation.

Contents

Search Control Options

search-controls

On small screens, the search button is below the input field and fits to fill width of the container.

On medium and larger, the search button to to the right of the input field.

Functionality OnClick/OnTap of button, the search results are shown using the content from the input field. (See OnPage load details)

1- Input Content – on Default the text reads “Search SAMHSA.gov”. However this text is updated according to the context, For instance on the Resource Template, the text is related to the resource collection.
2- Type ahead As the user begins to type their query, the system displays possible answers. The user can click an answer and the system will display the taget page
3- Button Content – on Default the text reads “Search”. However this text is updated according to the context.

Type-a-head Example search-controls

Search Page functionality – onLoad

On page load, content is sorted by Latest Published and 15 items are displayed.

There are three types of incoming searches, canned, keyword, empty.

Empty -

Keyword -

Typos and Misspellings

Canned -

Search Header

search-header

1- Page Title H1 Content = “Search Results”
2- Search Retured H4 Content = “Showing results for {Keyword or canned search terms}” Note line does not show on an empty search
3- Applied Filters Applied filters appear as buttons. OnClick/Tap filter is removed from filter set.  

Search Control Options

search-controls

Sort By

Options:

View

View line shows the total number of results.

View Options:

Search Listings

Search Listings

Functionality

OnClick/OnTap of Listing Title, system displays target link in the current window.

Content Specifications

1- Listing Title | H3 | required | Comes from target Page Title 2- Source | Text | reqired | Shows items source, for instance SAMHSA Publications, SAMHSA Blog, SAMHSA Data 3- Date | Text | required | Shows source date. In most instances this will be the publication date. 4- Summary | Text | reqired | Comes from the target summary field.

Search Accordion

multi-select-filters

Filters appear in the left rail on large screens sizes and within the Small Screen Filter Accordion. It is reccomended that the filters make use of accodion functionality if there are many on a page. On default page load, the accordion is in a closed state.

Small Screen Filter

Closed State small screen

On Small Screens, the search widget and filters are shown inside a filter accordion.

Open State small screen

Date Range

date-range

1- Parent accordion opens to show date range filter.

On Default,

On select of either year, result set is filtered to new date range.

Read more about the how the date picker component functions.

Single Select Filter

single-select-filters

1- Parent accordion opens to show a radio list. Only one item can be selected. OnSelection filter is applied to result set. OnDeselection or Selection of a different option, result is updated to match applied filter choice.

Note Both the radio and the label are part of the click/touch space.

Multi-Select Filter

multi-select-filters

1- Parent accordion opens to show children checklist. Multiple options can be chosen. OnSelection filter is applied to result set.

Note Both the checkbox and the label are part of the click/touch space.

Multi-level Filter

multi-level-filters

1- Parent accordion opens to show children accordions.

2- OnClick/OnTap of Child accordion opens to show items for selection inside, this could be a selection on multi-section list.

A max of 15 items should display, then list is scrollable to view more.

OnSelection of list filter, filter is applied to result set. OnDeselection the filter is removed from the result set.

Location Filter

location-filters

The location filter uses the multi-level filter compontent. The children accordions are States, Territories, Regions.

States

Territories

Regions

For more information about HHS Regions please check the website.

Pagination

See: Pagination specification

When priting search pages, it is important to conserve paper and only print the items necessary for the experience. Follow global printing rules and only print the SAMHSA logo in the header and the footer should only include the date printed and page numbers if over one page.

Search functionality does not print. This includes the Search Page title, search options, search widget, and filters.

What Prints:

View Full Page Designs

- footer here -