<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:
<product-roadmap start="2026-Q3" end="2027-Q2" today-marker> <section data-lane="Platform"> <article data-start="2026-Q3" data-end="2026-Q4" data-status="in-progress"> <h3>Multi-tenant database</h3> </article> <article data-start="2027-Q1" data-end="2027-Q2" data-status="planned"> <h3>Edge cache layer</h3> </article> </section> <section data-lane="Growth"> <article data-start="2026-Q4" data-end="2027-Q1" data-status="planned"> <h3>Onboarding rewrite</h3> </article> </section></product-roadmap>
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
| Attribute | Values | Default | Description |
|---|---|---|---|
start | string | — | First date in the range (ISO 8601 or "YYYY-Qn"; required) |
end | string | — | Last date in the range (ISO 8601 or "YYYY-Qn"; required, inclusive) |
view | "quarter", "month" | "quarter" | Time-axis granularity (default: quarter) |
editable | boolean | — | 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-marker | boolean | — | Render a vertical line at today's date if it falls within the range |
Child attributes
| Attribute | On | Values | Description |
|---|---|---|---|
data-lane | section | string | Lane name (used as the row label) |
data-start | article | string | Initiative start date (ISO 8601 or YYYY-Qn → first day of the quarter) |
data-end | article | string | Initiative end date, inclusive (ISO 8601 or YYYY-Qn → last day of the quarter). Equal to data-start for a one-day initiative |
data-status | article | "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 bluein-progress— accentat-risk— warning ambershipped— success greenblocked— 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"); firesproduct-roadmap:reschedule; writes ISOdata-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>; firesproduct-roadmap:move. If the same drag also changed the dates,reschedulefires first. - Click bar (or Enter/Space) → fires
product-roadmap:selectwith full detail. Works in read-only mode too.
A drag that snaps back to the original dates and lane fires nothing.
Events
| Event | Detail | Description |
|---|---|---|
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>, sincebuttonis 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
- 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. - CSS. The
:not(:defined)selector keeps the host visible pre-upgrade. - 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
<gantt-chart>— Task-level scheduling with dependencies.<burndown-chart>— Sprint progress at the day-level.<iron-triangle>— Sprint capacity / scope / time visualization.