Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Toolbar
  3. Accessibility

Toolbar

Accessibility

Toolbar from @prepared911/ui/toolbar presents a compact floating strip of actions. The component supplies the floating container and sizing; your job is to apply the toolbar role with a label, give each control an accessible name, and let keyboard users reach every affordance.
What the component handles
  • Floating layout. Keeps a consistent strip geometry with slot spacing and motion.
  • Elevation. Surface + shadow distinguish the toolbar from the content it sits above.
What you must provide
  • Toolbar role and label. Wrap the strip with role="toolbar" and aria-label ("Message actions", "Selection actions"). When more than one toolbar exists on the page, labels disambiguate them for rotor users.
  • Named controls. Every Button inside carries a title/label; toggle buttons expose aria-pressed.
  • Tab order. Controls appear in the tab sequence in visual order. Use roving focus when the toolbar grows large enough that Tab through every item becomes noisy.
  • Non-hover discoverability. If the toolbar is revealed on hover or selection, ensure keyboard focus and screen-reader navigation also reveal it—otherwise the actions are unreachable.
Keyboard behavior
Toolbars default to linear Tab navigation. When the strip contains many items, apply a roving-focus pattern:
  • Tab moves focus into the toolbar (lands on the first enabled button or the last focused one).
  • Arrow Left / Right move between buttons.
  • Home / End move to the first / last button.
  • Tab again moves out of the toolbar.
In @prepared911/ui, a Popover or Menu trigger wrapped in ToolbarItem is one roving item: the toolbar keeps one tab stop, and Arrow Left / Right (mirrored in RTL), Home, and End move across triggers like any other item. Enter, Space, or a press opens the surface; Escape closes it and focus returns to the trigger, which stays the tab stop. For a menu, Arrow Down opens on the first row and Arrow Up on the last; Tab from an open menu closes it and returns focus to the trigger. A disabled button inside a trigger is skipped by the arrows; disabled on ToolbarItem also works and wins. Put menu triggers in a horizontal toolbar; in a vertical toolbar Arrow Down and Arrow Up open the menu instead of moving.
Semantics and roles
  • role="toolbar" on the root with aria-label or aria-labelledby.
  • role="group" around related subgroups (formatting vs alignment vs insert).
  • Toggle buttons expose aria-pressed; disabled buttons expose aria-disabled.
Overflow menu (@prepared911/ui)
When overflowLabel is set, the toolbar keeps one tab stop. Arrow Left and Arrow Right (mirrored in RTL), Home and End reach the overflow control at the inline end. Arrow Down, Enter and Space open the menu; Escape or choosing a row returns focus to the control. If the focused item moves into the menu, focus moves to the control. Hidden bar items are not tab stops and are skipped by arrow keys. The overflow control is a Button with a tooltip named by overflowLabel and keeps Button's forced-colors paint. At 400% zoom (320 CSS px) and other narrow widths, every action stays reachable through the bar or the menu when each item has an overflowItem.
Known caveats
  • Overflow. If items don't fit, collapse the rest into an overflow Menu so keyboard users reach them without horizontal scrolling. In @prepared911/ui, use overflowLabel and overflowItem on Toolbar and ToolbarItem (TB-16).
  • Destructive actions. Keep destructive buttons in a clearly labeled section; rely on tone (color + icon + label) rather than position alone.
Previous
Toolbar / API and Development
Next
Tooltip / Usage
On this page
What the component handles
What you must provide
Keyboard behavior
Semantics and roles
Overflow menu (@prepared911/ui)
Known caveats