Actions
Icon button
A round button that shows only an icon, used for familiar actions where space is short, such as Search in the app bar or Next day beside a date.
In kanso-ui as IconButton
Accessibility
- Name each one with
aria-label, action and object: "Edit payment", "Next day", "Reminders for Weekly review". The icon isaria-hidden. - A toggle keeps its name and icon in both states;
aria-pressedtells the state. - On the web, add a Tooltip with the same words, shown on hover and focus.
- Tab reaches it; Enter and Space press it.
- Targets: 48px on phones; 32px on the web only.
- Contrast, light / dark:
inkonpaper16.7 / 15.9:1;inkoncontainer14.3 / 12.0:1;on-inkonink16.7 / 15.9:1; theoutlinering onpaper3.3 / 5.6:1; the focus ring onpaper7.3 / 9.0:1. - Motion: only the state layer fades, in 150ms.