s72
  • Count badge and removable tag

    data-remove

    A <mark> inside a button is a count badge. A <button data-remove> inside a <mark> turns the chip into a tag the reader can take off.

    Basic

    rust macos

    html
    <p style="display:flex;flex-wrap:wrap;gap:.75rem;align-items:center">
      <button>Inbox <mark>12</mark></button>
      <mark data-tone="info">rust <button data-remove aria-label="Remove rust">×</button></mark>
      <mark data-tone="go">macos <button data-remove aria-label="Remove macos">×</button></mark>
    </p>

    Each remove button needs its own label: an × on its own says nothing about what it removes.

    Notes