Toolbar

v.1.7

Overview

Toolbar creates a way for the user to take actions against content within a region or subregion of the page. It houses Action components such as buttons (types: primary, secondary, text, icon), inputs and even selects.


Anatomy

Layout & Placement

Toolbar & Overflow Menu
Action Elements have a set of three properties to define where they will be displayed:

Contextual Region

**Inline:


**Toolbar is placed inline with other Header components. If a tool includes a Contextual Region, the region will render inline from left-to-right. Inline will typically be used on desktop-sizes that include more horizontal space than mobile or tablet.

Example (Fig 1A): Tooblar includes two Action Groups. Search icon includes a Search Box modifier, which will be placed in the Contextual Region (Fig 1B).

 

 

Available Controls

The following components are available for the toolbar. Some have been excluded due to usability concerns.

COMPONENT
1FILLED BUTTON
2OUTLINE BUTTON
3ICON BUTTON
4TEXT BUTTON
5CHECKBOX
6SEARCH BOX
7COMBO BOX
 

 

Usage Warnings

🚧

Using the Appropriate Size

Toolbar includes a compact size variant which allows it to fit specifically to a min-height of 24. As a result, controls with a height greater than 24 cannot be used in the compact variant. For example, Date Picker, Combo Box or Input text.

A typical use case for the compact variant is Data Table, which also includes a compact variant with row heights of 24 so it would be appropriate to use the compact variant of Toolbar.


Digital Accessibility

Keyboard Behavior

The Toolbar can group a set of interactive elements into a single tab stop. When the toolbar has focus, the container element border is highlighted simultaneously when the toolbar item highlight has focus, helping indicate that the container supports directional navigation with the arrow keys.

 

 

Navigation and focus details for embedded components can be found in their respective specs.

KEYFUNCTION
TAB / SHIFT + TABMoves focus into and out of the toolbar (the left-most control is focused when receiving focus for the first time after page load. Otherwise, the most recently focused control receives focus).
ENT/RET or SPCMakes a selection; submits a value (i.e. button, menu/list, overflow menu, search).
Selects an interactive element after being navigated to by tab or arrow.
Places focus on the trigger element (Data Table).
Activates trigger element to display Toolbar and place focus on left-most control (Data Table).
Right ArrowMoves focus to the next control on the right.
If the last control has focus, focus moves to the first control.
If an item in the popup menu has focus, does nothing.
Left ArrowMoves focus to the previous control.
If the first control has focus, focus moves to the last control.
If an item in the popup menu has focus, does nothing.
HOMEMoves focus to the first control.
ENDMoves focus to the last control.
ESCCloses the Toolbar and returns focus to the trigger element
WAI-ARIA ROLES
The element that serves as the toolbar container has role toolbar.

References

W3C Toolbar Pattern

W3C Toolbar Example