Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 03 Actions

Toolbar

A row of controls that counts as one stop for the Tab key. Inside it the arrow keys move from control to control, flipped in Arabic; Home and End jump to the ends. Tab again leaves it.

Use it in Angular
import { ToolbarComponent, ToolbarSeparatorComponent } from '@okaapi-ui/angular';

Editor actions

Tab in, then use the arrow keys. Tab out and back: focus returns to the last control you used.

Angular
<ui-toolbar label="Note">
  <button ui-button variant="ghost" iconOnly type="button" aria-label="Undo">
    <ui-icon name="undo-2" />
  </button>
  <button ui-button variant="ghost" iconOnly type="button" aria-label="Redo">
    <ui-icon name="redo-2" />
  </button>
  <ui-toolbar-separator />
  <button ui-toggle size="sm" iconOnly aria-label="Pin">
    <ui-icon name="bookmark" />
  </button>
  <button ui-button variant="ghost" type="button">Copy</button>
  <button ui-button variant="ghost" type="button">Delete</button>
</ui-toolbar>

In Arabic

Angular
<ui-toolbar label="الطلب">
  <button ui-button variant="ghost" type="button">طباعة</button>
  <button ui-button variant="ghost" type="button">استرداد</button>
  <button ui-button variant="ghost" type="button">إلغاء</button>
</ui-toolbar>

When to use something else

If you needUse
Two or three buttons that sit togetherButton group
Links to other pagesNavigation
Actions that do not fit, behind one buttonMenu

Inputs

NameTypeDefaultWhat it does
labelstring — Required. What the controls act on, for screen readers.
orientation'horizontal' | 'vertical''horizontal'Which arrow keys move: left and right, or up and down.
<ui-toolbar-separator>component — A line between groups of controls.

Keyboard and screen readers

KeysWhat they do
Tab Enter the toolbar, and Tab again leaves it.
Left or Right Move to the previous or next control, wrapping round. Flipped in Arabic.
Up or Down The same, in a vertical toolbar.
Home or End Go to the first or last control.
  • Read as a toolbar with its name and orientation.