Skip to content
AXIcons
AXIcons
Theme

Accessibility

Decorative versus meaningful icons, accessible names and icon buttons.

Decorative icons

Without a title, React icons render aria-hidden="true". That's right when nearby text says the same thing.

React
<button>
  <IconTrash /> Delete
</button>

Meaningful icons

When the icon carries information on its own, give it a title. It then gets role="img" and a <title> that screen readers announce.

React
<IconCircleCheckFilled title="Verified" className="text-emerald-600" />

Icon-only buttons

Name the button, not the icon, and keep the target at least 24×24px (44×44px on touch screens).

React
<button type="button" aria-label="Close dialog" className="grid size-10 place-items-center">
  <IconX size={20} />
</button>

Contrast

Icons that convey meaning need 3:1 contrast against their background (WCAG 1.4.11). Thin strokes read lighter than text of the same colour, so check light greys at small sizes.

Something wrong or missing?Open an issue

Jump to
Browse all iconsIcon library
InstallationGetting started
Quick startGetting started
ReactIntegrations
React NativeIntegrations
↑↓ navigateopen⌘K toggle