Resonance Logo

Badge

A removable label used to represent active filters or selections, with a keyboard-accessible remove button that announces its action to assistive technology.

Demo

Tab to reach each badge's remove button and press Enter or Space to dismiss it. Observe how the button's accessible name identifies which badge will be removed, and how screen readers announce the change when a badge is dismissed.

JavaScript
React
Node.js
TypeScript

What to Observe

Anatomy

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

  1. Badge Container — the wrapping element that groups the label text and the remove button into a single perceived unit
  2. Label Text — the visible text identifying the filter or selection the badge represents
  3. Remove Button — a native button element that dismisses the badge; its accessible name must reference the badge label so the action is unambiguous
  4. Remove Icon — a decorative symbol (typically an X) inside the remove button; hidden from assistive technology since the button's accessible name carries the meaning

Accessibility Behavior

Common Mistakes

Why This Matters

Badges appear in filtering and tagging interfaces where users actively manage their current selections. When the remove button lacks a meaningful name, a screen reader user hears only "button" — with no indication of which filter they are about to clear. When focus is not managed after removal, keyboard users lose their place entirely. These failures accumulate in interfaces where users are expected to add, review, and remove multiple selections. Getting this right ensures all users can efficiently manage their filter state without confusion or lost context.

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