VB Project Planning

<product-roadmap>

Interactive themes × quarters product roadmap. Auto-discovers lane sections + initiative articles; editable mode wires drag-to-reschedule, drag-to-resize, and drop-on-lane.

Overview

The <product-roadmap> component renders a horizontal time axis (quarters or months) with one swimlane per <section data-lane>. Each <article data-start data-end> inside a lane becomes a status-coded bar spanning its date range.

Distinct from <gantt-chart>: roadmap is theme-centric (initiatives in lanes, status as enum, no dependency arrows). Gantt is task-scheduling. Use roadmap for quarterly product roadmaps; gantt for project plans.

Authoring shape

The component reads its content from authored HTML — no JSON config required. Lanes are <section data-lane>; initiatives are <article data-start data-end> inside a lane:

Dates accept ISO 8601 (2026-07-01) or quarter shorthand (2026-Q3). For data-end, quarter shorthand resolves to the last day of the quarter.

Every end date is inclusive — the host's end and each initiative's data-end. data-start="2026-Q3" data-end="2026-Q3" covers July 1 – September 30, and an initiative whose data-start equals its data-end is drawn as a one-day bar. Dates are calendar days in the viewer's local time zone.

Attributes

AttributeValuesDefaultDescription
startstring—First date in the range (ISO 8601 or "YYYY-Qn"; required)
endstring—Last date in the range (ISO 8601 or "YYYY-Qn"; required, inclusive)
view"quarter", "month""quarter"Time-axis granularity (default: quarter)
editableboolean—Enable editing: drag a bar (or press ←/→) to reschedule, drag its right edge (or Shift+←/→) to resize, drag onto another lane (or Alt+↑/↓) to move it
today-markerboolean—Render a vertical line at today's date if it falls within the range

Child attributes

AttributeOnValuesDescription
data-lanesectionstringLane name (used as the row label)
data-startarticlestringInitiative start date (ISO 8601 or YYYY-Qn → first day of the quarter)
data-endarticlestringInitiative end date, inclusive (ISO 8601 or YYYY-Qn → last day of the quarter). Equal to data-start for a one-day initiative
data-statusarticle"planned", "in-progress", "at-risk", "shipped", "blocked"Status enum; drives the bar colour and a visible status label (custom values are shown as text with the default colour)

Status

Set data-status on each initiative. The status is shown as a text label inside the bar and included in the bar's accessible name; the colour is an additional cue, never the only one. Recognized values and their colours:

  • planned — info blue
  • in-progress — accent
  • at-risk — warning amber
  • shipped — success green
  • blocked — danger red

Custom statuses are shown as text with the default accent colour. Override --color-accent or per-status tokens to retheme.

Editable mode

Add the editable attribute to enable interactive editing. A press that moves less than 4 px is a click; only a real drag changes dates.

  • Drag bar body (or ←/→ on a focused bar) → both ends snap to the nearest quarter boundary (or month, if view="month"); fires product-roadmap:reschedule; writes ISO data-start/data-end (inclusive end, e.g. 2027-03-31) to the source <article>.
  • Drag right edge (or Shift+←/→) → the end snaps to the last day of the nearest period, never shorter than one period; fires product-roadmap:resize.
  • Drag onto another lane (or Alt+↑/↓) → moves the source <article> into that <section data-lane>; fires product-roadmap:move. If the same drag also changed the dates, reschedule fires first.
  • Click bar (or Enter/Space) → fires product-roadmap:select with full detail. Works in read-only mode too.

A drag that snaps back to the original dates and lane fires nothing.

Events

EventDetailDescription
product-roadmap:select{ initiative, lane, start, end, status }Fired when a bar is clicked or activated with Enter/Space. start/end are inclusive YYYY-MM-DD
product-roadmap:reschedule{ initiative, lane, start, end }Fired when a drag along the time axis (or ←/→ in editable mode) changes the dates. Both ends snap to the nearest period boundary; end is inclusive (e.g. 2027-03-31). Not fired when a drag snaps back to the same dates
product-roadmap:resize{ initiative, lane, start, end }Fired when dragging the right edge (or Shift+←/→) changes the end date; the end snaps to the last day of the nearest period, never shorter than one period
product-roadmap:move{ initiative, fromLane, toLane, start, end }Fired when a bar is dropped on a different lane (pointer drag or Alt+↑/↓). The source <article> is moved into the target <section data-lane>. If the drag also changed the dates, reschedule fires first

Accessibility

  • Each bar is a focusable role="button" (a <div>, since button is not an allowed role on <article>). Its accessible name starts with the text shown on the bar — title, then status — and then adds the dates and lane (e.g. “iOS rewrite, At risk — July 1, 2026 to March 31, 2027 in Mobile”), so voice-control users can say what they see (WCAG 2.5.3). Enter or Space selects it.
  • Status is shown as visible text, not by colour alone.
  • In editable mode every pointer edit has a keyboard equivalent (see above); the bars reference a visually hidden description of the keys, and changes are announced through a polite live region. Focus stays on the edited bar.
  • The resize handle is a pointer-only target and is hidden from assistive technology; Shift+←/→ is its keyboard equivalent.

Today marker

Add today-marker to render a vertical line at the current date if it falls within the visible range. Useful for "where are we now in the year" context.

Progressive Enhancement

  1. HTML. Without JS, the component CSS hides source lanes (otherwise <article> headings would flash before upgrade). Authors who need a visible no-JS fallback should render a sibling table or list.
  2. CSS. The :not(:defined) selector keeps the host visible pre-upgrade.
  3. JS. Auto-discovers lanes + initiatives, builds the time-axis header, positions bars by date fraction, optionally wires pointer and keyboard editing.

Known limitations (v1)

  • Overlapping initiatives in the same lane render stacked (later DOM order on top). Sequence non-overlapping work in a single lane, or split overlapping work into multiple lanes.
  • Initiatives whose dates fall entirely outside the visible range are skipped. Initiatives crossing the boundary are clipped.
  • Edits write ISO dates back to the source <article>; quarter shorthand is not preserved after an edit.

Related

↑