How to name a toolbar button that only shows an icon
Answer in brief
Give the native button an accessible name describing its action. Keep decorative artwork inside the control from adding a second name.
Check a cropping tool
Use a button named “Crop image” containing a decorative crop glyph. Tab to it, listen for the name and role, then use Space and Enter in separate trials to confirm the action works.
Prevent accidental form submission
A crop button placed inside an upload form can submit that form if it has the default submit behavior. Use type="button" for the crop command and leave submission to the explicit save control. Test by focusing the crop button and pressing Enter with a partly completed form.
Sources
- [1] Button Pattern | APG | WAI | W3C — W3C, accessed November 23, 2026
Frequently asked questions
What name distinguishes two trash buttons?
Include the object when surrounding context is ambiguous, for example “Delete cover image” and “Delete attachment”.