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…
Interactive change tracking group that wraps related ins and del elements with toggle controls for tracking, final, and original views.
Overview
The <change-set> element groups related <ins> and <del> elements into a reviewable unit. Users can toggle between three views: tracked changes (both visible), final text (only insertions), or original text (only deletions).
The view states are CSS-only via the viewattribute. JavaScript adds a caption built from author / datetime (“Changes by tpowell, Feb 20, 2026”) and Tracking / Final / Original toggle buttons.
Basic usage
1234567891011
<change-setdatetime="2026-02-20"author="tpowell"><p> Send requests to<del>/api/v1/upload</del><ins>/api/v2/ingest</ins> with a<del>Content-Type: application/xml</del><ins>Content-Type: application/json</ins> header.</p></change-set>
Set view directly in markup for server-rendered or static pages. No JavaScript is needed for the visual states. Add controls="none" when readers should not switch views; the toggle buttons are then not rendered.
Static views
123456789101112131415
<!-- Server-rendered final view (no JS needed) --><change-setview="final"controls="none"><p><del>Old API endpoint</del><ins>New API endpoint</ins> is now live.</p></change-set><!-- Original view (toggles still offered after upgrade) --><change-setview="original"><p><del>Old API endpoint</del><ins>New API endpoint</ins> is now live.</p></change-set>
Multiple Changes
A single <change-set> can group changes across multiple sections. All <ins> and <del> descendants are toggled together.
Multiple changes
1234567891011121314151617181920212223
<change-setdatetime="2026-03-01"><section><h3>Endpoint</h3><p><del>POST /api/v1/upload</del><ins>POST /api/v2/ingest</ins></p></section><section><h3>Content Type</h3><p><del>application/xml</del><ins>application/json</ins></p></section><section><h3>Response</h3><p><del>Plain text status message</del><ins>Structured JSON with status, data, and errors</ins></p></section></change-set>
Controls which content is visible. Observed: changing it updates the toggles' pressed state.
datetime
ISO 8601 date
—
Date of the change set. Rendered in the caption and in the toggle group's accessible name.
author
String
—
Author of the changes. Rendered in the caption and in the toggle group's accessible name.
controls
none
Omitted (toggles shown)
none renders no toggle buttons (fixed view)
JavaScript API
Events and programmatic control
123456789101112
// Listen for view changesdocument.addEventListener('change-set:view', (e) => {console.log(e.detail.view);// 'tracking' | 'final' | 'original'});// Programmatic controlconst cs = document.querySelector('change-set');cs.view = 'final'; // Show only insertionscs.view = 'original'; // Show only deletionscs.view = 'tracking'; // Show both// Assigning the current view is a no-op; unknown values are ignored.
Fired when the view mode changes. Bubbles. source: 'api' when set through the view property; absent for toggle clicks.
Accessibility
Toggle buttons use aria-pressed to indicate the active view, starting from the viewattribute
The toggles sit in a role="group" (not a landmark — a page can hold many change sets) named “Change view” plus the caption, e.g. “Change view, Changes by tpowell, Feb 20, 2026”
In tracking view each <ins> / <del> gets visually-hidden start / end markers (“[insertion start]” … “[insertion end]”) as generated content, because screen readers do not reliably announce those elements. Localize them with --change-set-ins-start, --change-set-ins-end, --change-set-del-start, --change-set-del-end (CSS strings).
In final and original views, hidden content uses display: none — it is removed from both the visual and accessibility trees
Without JavaScript, all content is visible in tracking view