Resonance Logo

Button

A native button element that triggers an action and communicates its purpose through a visible label, supporting keyboard operability and correct semantics out of the box.

Demo

Tab to each button and press Enter or Space to activate it. Observe how the button responds to keyboard input, how its label is announced by a screen reader, and how disabled buttons are communicated without removing them from the tab order.

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Button Element — the native HTML element that provides keyboard operability, focus management, and the implicit button role without any additional attributes
  2. Label Text — the visible text inside the button that describes the action it performs; this becomes the button's accessible name
  3. Icon — an optional visual symbol that supplements or replaces the text label; decorative icons are hidden from assistive technology, while meaningful icons require a text alternative
  4. Focus Indicator — the visible outline or ring that appears when the button receives keyboard focus, communicating the user's current position

Accessibility Behavior

Common Mistakes

Why This Matters

Buttons are the most fundamental interactive element on the web, yet they are frequently replaced with styled divs or anchors that lack the native behavior keyboard and assistive technology users depend on. A div styled as a button does not respond to Enter or Space, is not reached by Tab, and is announced incorrectly by screen readers. Even when using a native button, missing labels, removed focus indicators, and ambiguous icon buttons create barriers that prevent users from understanding or completing actions. Using the correct element with a clear label is the simplest and most impactful accessibility decision in UI development.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation