Components › Forms & input › Filter › Filter chip

Filter chip

canon

One filter field written out: icon, field name and value; the chip opens the field menu.

Rendered by FilterBar.tsx (ChipMenu); the menu frame is the canonical Popover. 14 Oct 2026 (acrm !5045): chip = field icon + value, field name in aria-label/title (RULES §24.3).

Used in 7 files · 7 areas · 18× — components/FilterBar, components/communication, components/segment, pages/PostaPage, pages/SetkaniPage, pages/TasksPage …

Keyboard

  • The chip is a <button> with aria-haspopup="menu" and aria-expanded; Enter or Space opens the menu, Escape closes it and the chip keeps focus.
  • Menu rows are <button role="menuitemradio"> (one value) or role="menuitemcheckbox" (several values) with aria-checked.
  • Free text: the search row takes focus on open (autoFocus), Enter confirms the typed value and closes the menu, Escape cancels.
  • Missing: with the search row absent, the menu does not take focus at all, and because the popover is portalled to the end of <body>, Tab from the chip walks the rest of the page instead. Arrow-key movement between rows does not exist (Popover handles only Escape).

ARIA

  • Row state is carried by aria-checked, not by the glyph: .chk.off is only hidden visually (visibility: hidden), and .ck is a decorative box.
  • The menu panel gets role="menu" from Popover; its accessible name comes from the chip that opened it (ariaLabel), and the menu deliberately has no visible heading.
  • Vymazat filtr is an ordinary button in the footer, not a menu item — it acts on the field rather than choosing a value.
  • The empty and loading line .fb-empty is plain text: it is not announced when it replaces the list (no live region).

Focus

  • No focus rule in filter-bar.css: chip, options and the clear row are <button>, so they take the foundation ring from ds.css — outline: 2px solid var(--accent); outline-offset: 1px.
  • The search input opts out (outline: 0) and answers with :focus-within on .acrm-recordselect-search.
  • Picking a value in a single-value menu closes it and returns focus to the chip; in a multi-value menu focus stays on the row that was clicked.

Contrast

Computed from packages/ui/src/tokens/tokens.css:

  • Option label .fb-opt --fg on --surface-100 = 17.59:1 light, 14.53:1 dark.
  • Check .chk --accent on --surface-100 = 4.44:1 light, 3.83:1 dark — non-text, passes 3:1.
  • Checkbox .ck border --border-strong on --surface-100 = 1.38:1 light, 1.55:1 dark (below the 3:1 non-text minimum); when on it is filled --accent with a white glyph = 4.44:1.
  • Empty / loading line --fg-muted on --surface-100 = 2.85:1 light, 3.63:1 dark — below AA for text.
  • Clear row .fb-clear --fg-muted = 2.85:1 light, going to --ink-700 (12.99:1) on hover.
  • Chip: value --ink-900 17.59:1, field name --fg-muted 2.85:1 light (see Filter bar).

Known limits

  • The menu is unreachable by keyboard unless it opens with a search field: no focus move on open, no arrow keys, and the panel is portalled away from the chip in the tab order.
  • The unchecked checkbox border (1.38:1 light) is below the 3:1 non-text minimum.
  • Muted text (.k, .fb-empty, .fb-clear) sits at 2.85:1 in light theme.
  • Nothing announces the result of a pick — neither the new chip value nor the re-filtered listing is spoken.

Source: docs/filter/filter-chip.a11y.md · GitLab