About this set
Four kinds of chip for content and filtering. Topic tags are links in a labelled list, styled as rounded hashtags such as accessibility and css-grid. Filter chips for a recipe search are real buttons with aria-pressed: pressing one fills it with an indigo tint and shows a tick, so the state is visible without relying on colour. Removable chips show the filters applied to a hotel search, such as Lisbon and Under 180 euros, each with its own remove button and a Clear all link. Person and icon chips pair a small initials avatar or an icon with a name, date or place. Use link tags for taxonomy, filter chips where several options can be on at once, and removable chips to summarise what is applied. A short vanilla script flips aria-pressed and handles removal: it announces the removed filter through a status region and moves keyboard focus to the next chip, the previous one, or the section heading when none remain, so focus is never lost on the page.
What’s included
- Filter chips as buttons with aria-pressed and a visible tick
- Removable chips with labelled remove buttons such as Remove filter: Lisbon
- Focus moves to the next chip or the heading after a removal
- Removals are announced through a role="status" region
- Link tags in a labelled list and static person and icon chips
Accessibility
Filter chips are native buttons whose aria-pressed state is announced as pressed or not pressed, and the tick gives a non-colour cue. Each remove button is named, for example Remove filter: Free cancellation, and after a removal the script announces it and moves focus to a neighbouring chip or the heading. All links and buttons show a 2px indigo focus outline, and hover transitions switch off under prefers-reduced-motion.
Customise it
Set --chip-accent, --chip-accent-soft and --chip-accent-text on .chips in plain CSS for the pressed colours. Bootstrap restyles .btn and .btn-close through --bs-btn-* and --bs-btn-close-bg; in Tailwind edit the aria-pressed: and hover: colour utilities.


