Feature Library

Tabs, segmented controls and tooltips, done properly

<0.01 CPU ms
A still of the Tabs, segmented controls and tooltips, done properly demo
Still
The live demo starts when it’s in view.Tab into each control and use the arrows · hover or focus the toolbar for tips · Esc hides a tip

Three small cores that get the details right.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
0.23 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo driving itself, one step every 20 frames: the next tab is chosen (its panel shown, the marker slid), the view and range segments move on, and a toolbar tooltip is shown and placed, then hidden. Nothing runs between steps: every core rests until something happens. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed<0.010.23
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.010.02
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed<0.010.32

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Settings and detail pages split into sections
  2. View switchers (list, board, calendar)
  3. Ranges and filters with two to five choices
  4. Icon-only toolbars that need names
  5. Hints beside form fields

Pitfalls, in brief

  1. Import tabs-tooltips.base.css before tabs-tooltips.css (or your own look).
  2. A tooltip is a hint, never the only place something is said.
  3. Disabled buttons fire no pointer events in some browsers, so their tips never show.
  4. The tip lives in document.body by default.
  5. An icon-only button gets its name from the tip with as: "label" (aria-labelledby).
3 more in brief
  1. Tabs with overflow wrap the tablist in a strip of their own (to hold the scroll buttons).
  2. Manual activation keeps the Tab stop on the chosen tab, so after arrowing to another tab without pressing Enter, Tab moves on to the panel of the one still chosen.
  3. The markers follow the layout through a ResizeObserver: a tab row built while hidden is placed when it first shows.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

WAI-ARIA Authoring Practices Guide (W3C): The tabs pattern (roles, aria-controls and aria-labelledby both ways, automatic and manual activation, Home/End), the radio group pattern (one Tab stop, arrows move and check) and the tooltip pattern (role=tooltip, aria-describedby, Esc). Written here from scratch.

WCAG 2.2, 1.4.13 Content on Hover or Focus (W3C): Why a tip can be dismissed with Esc, can be hovered itself, and stays until the pointer or focus leaves.

tabstablistsegmented controlradio grouptooltiproving tabindexaria-describedbyplacementaccessibilitykeyboardtouchrtldomcssno dependencies

Near it in the frame