Navigation

v1.0.0
Design

Accessibility

Give meaning to icons and the controls around them.

On this page

#Name the control

An icon beside visible text is decorative. Leave label unset: the renderer sets aria-hidden="true". For an icon-only button, give the button an accessible name.

<button aria-label="Search"><SearchIcon size={20} /></button>

#Name a standalone icon

When an icon conveys information by itself, provide label. The renderer adds role="img" and the accessible label.

<SearchIcon label="Search" />

Do not rely on color alone to convey state. Keep keyboard focus visible, provide a large enough activation area, and place essential explanations in text.