Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

progress-tracker

Multi-step progress bar for wizard / checkout / onboarding flows. Status per step (complete / current / upcoming / error). Distinct from <slide-accept> (slide-to-confirm).

Overview

<progress-tracker> renders a multi-step progress indicator for wizards, checkout, onboarding, fulfillment status — anywhere a user moves through a sequence and may need to see where they are.

Write the steps as a native <ol> inside the element. Without JavaScript it is a plain numbered list; once upgraded, the component decorates each <li> with a numbered circle, connector line and status (complete / current / upcoming / error). The author's label markup (links, <small> sub-labels, icons) is kept, not flattened. Step navigation is author-driven via data-current; with data-clickable, completed steps become buttons that go back.

When to use which primitive

Use thisWhen
<progress-tracker>Multi-step linear progress driven by script (wizard, checkout, onboarding, order tracking): status per step, error state, step events.
<nav class="steps">The same indicator with no JavaScript: an <ol> where you mark aria-current="step" and data-completed yourself, and links go back.
<slide-accept>Slide-to-confirm UX. Different shape (single action, not multi-step).
Native <progress>Continuous progress (download, processing). progress-tracker is for discrete labelled steps.

Author surface

data-current is matched against the steps' data-step ids first, then read as a 1-based index. Ids are stable strings, so they keep pointing at the right step when steps are added or removed conditionally — numeric ids such as "2024" are safe because an id match always wins. data-step is optional; without it a step's id is its position. Steps added to the list later are decorated automatically.

Status states

StatusWhenVisual
completeStep is before data-currentFilled green circle with ✓; connector to the next step is green.
currentStep matches data-currentOutlined accent circle with the step number; emphasized via ring.
upcomingStep is after data-currentOutlined muted circle with the step number; muted connector.
errorStep has data-error regardless of positionFilled red circle with ! and red label; the connector leaving it is red.

Vertical

Five or more steps squeeze their labels on a phone. data-direction="vertical" stacks the steps with a vertical connector, labels beside the circles.

Clickable steps

Set data-clickable to let users go back to a completed step. Each completed step's label is rendered inside a native <button>, so it is in the tab order and works with Enter and Space as well as the pointer. The current and upcoming steps are not activatable: forward navigation requires the wizard to set data-current after validation. Activating a step fires one progress-tracker:step event with source: 'click'.

Accessibility

  • List: the steps are your native <ol>. The component names it from data-label-list on the host (default Progress) unless the <ol> already has aria-labelledby or aria-label. Prefer data-label-list or aria-labelledby pointing at a visible heading.
  • Current step: gets aria-current="step". When the current step changes after the page has loaded, the new step is announced politely to screen readers, for example Step 2 of 4: Profile (data-label-announce). The step shown on load is not announced.
  • Position and status: each step carries visually hidden text read with its label, for example Step 1 of 4: Account (completed). The circle glyphs (✓, !, numbers) are aria-hidden. All strings are attributes (below), so they can be translated.
  • Keyboard (clickable mode): completed steps are native buttons — Tab reaches them, Enter or Space activates. There are no arrow-key bindings; the current and upcoming steps are not focusable.
  • Forced colors: connectors are redrawn in CanvasText, complete and error circles use Highlight, and the current circle gets a solid outline ring.
  • Right-to-left: connectors use logical properties, so the tracker mirrors in RTL pages.

Attributes

AttributeTypeDefaultDescription
data-currentstringfirst stepActive step: a data-step id, else a 1-based index.
data-clickablebooleanfalseCompleted steps become buttons that navigate back.
data-directionhorizontal · verticalhorizontalStack the steps vertically.
data-label-liststringProgressName for the <ol> when it has none.
data-label-stepstringStep {n} of {total}:Hidden position prefix. An empty value removes it.
data-label-completestring(completed)Hidden status text for completed steps.
data-label-currentstringemptyHidden status text for the current step (empty because aria-current="step" already says it).
data-label-upcomingstring(not started)Hidden status text for upcoming steps.
data-label-errorstring(error)Hidden status text for errored steps.
data-label-announcestringStep {n} of {total}: {label}Text announced to screen readers when the current step changes.

Per-step attributes (on <li>)

AttributeDescription
data-stepStable step id (any string; defaults to the 1-based position).
data-errorMarks this step as errored regardless of position.
data-statusSet by the component (complete · current · upcoming · error); use it as a styling hook.

Events

EventBubblesDetail
progress-tracker:stepyes{ step, previousStep, source: 'attr'|'click' }. Fires when data-current changes after the element has upgraded, or once when a completed step is activated. Not fired on upgrade, nor when the current step is clicked.

CSS custom properties

PropertyDefaultPurpose
--pt-circle-size1.75remDiameter of the step circle.
--pt-line-thickness2pxConnector line thickness.
--pt-color-complete--color-successFill / connector color for completed steps.
--pt-color-current--color-interactiveOutline / ring color for the active step.
--pt-color-upcoming--color-borderOutline / connector color for upcoming steps.
--pt-color-error--color-errorFill / connector color for errored steps.
--pt-color-text-on-fill--color-text-on-interactive-autoGlyph color on filled (complete / error) circles.

See also

  • data-wizard — the multi-step form behaviour. Point data-wizard-steps at a <progress-tracker> and the wizard sets data-current on every step change (one <li> per step fieldset, in order); with data-clickable, clicking a completed step moves the wizard back.
  • <nav class="steps"> — the HTML-only step indicator.
  • <slide-accept> — slide-to-confirm UX (different shape).
  • Native <progress> — continuous progress.
↑