Skip to content

Accessibility

The List presents a set of related items as one group. Built on native list markup, it carries list semantics for free, so assistive technology can announce the item count and each item’s position (“list, 3 items, item 1 of 3”) without any extra wiring. The list itself takes no focus, only the controls its rows wrap do, and it meets WCAG 2.1 AA.

  • Item labels must keep accessible contrast against every supported surface (lists sit inside dropdowns, modals, and side panels). Source: WCAG 1.4.3 Contrast (Minimum).
  • Dividers, and any non-text indicator that carries meaning, must have sufficient contrast against the surface behind them. Source: WCAG 1.4.11 Non-text Contrast.
  • If an item’s status is shown with colour, never let colour be the only cue — pair it with text, an icon, or a shape. Source: WCAG 1.4.1 Use of Color.
  • Keep row height and spacing consistent and comfortable so the list stays scannable; where a consumer makes a row interactive, that target should clear the 44 px minimum.
  • Use semantic colour tokens (e.g. foreground/neutral/default) rather than fixed values, so the list adapts correctly across themes and surfaces.

Build the list from native <ul> or <ol> with <li> children so the list role, item count, and each item’s position are exposed to assistive technology automatically — no ARIA needed. Source: WCAG 1.3.1 Info and Relationships.

Watch the Safari quirk: setting list-style: none (as the styled tng-list does to drop the native markers) makes Safari and VoiceOver strip the list role, so the count and position are lost. Restore it with role="list" on the container when your styling removes the markers. The tng-plain-list variant keeps its markers and needs no such fix.

Name the list when its purpose isn’t clear from surrounding context: associate a visible heading with aria-labelledby, or give the container an aria-label, so it doesn’t announce as an unnamed list. When the list follows a heading that already describes it, no extra name is needed. Source: WCAG 4.1.2 Name, Role, Value.

Where a row wraps a link, button, or checkbox to make it actionable, that control’s role, keyboard behaviour, and accessible name belong to the consumer’s content — the List documents only its own item structure.

These apply where rows wrap a link, button or checkbox.

Key Action
Tab / Shift + Tab Move forward / backward through the list’s controls
↑ / ↓ Move between the options of a checkbox list
Space Toggle the focused checkbox
Enter Activate the focused option or action
Escape Close the overlay the list sits in

When a list opens in an overlay, focus moves to its first option, and focus can’t leave the overlay until it closes. Focus then runs top to bottom through every option and on to the actions: Clear all, then Show results. Shift + Tab follows the reverse order, and scrolling inside the list doesn’t change it. A row that isn’t interactive takes no focus. Source: WCAG 2.4.3 Focus Order.

  1. First option
  2. Next option
  3. Clear all
  4. Show results