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

week-view

7-day time grid composing day-view-style columns in a semantic table with auto mode, spanning events, and keyboard navigation.

Overview

The <week-view> component renders a weekly schedule as a semantic <table> styled with CSS Grid and subgrid. Each column represents a day; each row an hour. Events are <calendar-event> elements placed in the correct cell, with support for multi-hour spanning and double-booking.

Auto Mode

Place <calendar-event> children with data-date attributes directly inside <week-view>. The component scans event dates and times, computes the hour range, and builds the table automatically.

Each <calendar-event> must have data-date="YYYY-MM-DD" to assign it to a day column, and a <time datetime> for the hour slot. The datetime may be HH:MM or a full ISO datetime; the wall-clock time is used as written (offsets are not converted). Events without a date in range or without a time are not placed: once the component upgrades they are hidden (they stay in the events getter, so a set→get round-trips).

Without data-start-date the view shows the current week, starting on the first day of the week for the closest [lang] (Sunday for en-US, Monday for de or en-GB; read from Intl.Locale week info). An empty <week-view> still renders the grid. Today’s day header carries aria-current="date" and is highlighted.

Attributes

AttributeTypeDefaultDescription
data-start-date ISO date current week First day of the view (e.g., 2026-04-06). Defaults to the current week, starting on the locale’s first day of the week.
data-days number 7 Number of day columns, 1–14. Use 5 for a workweek. Invalid values fall back to 7.
data-start-hour number | "auto" "auto" First visible hour, or "auto" to compute from events. A numeric range grows to fit events outside it.
data-end-hour number 19 Last visible hour. Ignored when data-start-hour="auto".
data-label-continues string "continues after the visible hours" Appended to the accessible name of a spanning event clipped at the last visible hour. Localisation hook.
data-label-time string "Time" Visually hidden name of the corner header above the hour labels. Localisation hook.

Changing any of these attributes after upgrade rebuilds the generated table (an authored <table> is left alone).

Workweek

Set data-days="5" with a Monday data-start-date to show Monday through Friday only.

Multi-Hour Events

Add data-duration to span across hour rows, matching the <day-view> pattern.

Durations are parsed exactly as in <day-view>: 2h, 1.5h, 45m, 90m, 1h30m, bare minutes (60) and ISO-8601 (PT1H30M); anything else falls back to one hour. Overlapping spans in the same day column are laid out side by side. A span running past the last visible hour is clipped, marked data-continues (dashed end edge) and its accessible name says it continues. Spans re-measure when the view resizes; call refresh() after changing data-duration yourself.

Table Structure

The generated table uses semantic elements for accessibility: <th scope="col"> for day headers and <th scope="row"> for hour labels. CSS Grid with subgrid provides the visual layout.

ElementPurpose
<table>Grid container for the hours × days layout
<thead> <th>Day column headers with <time> elements. The visible text is short (“Mon 6”, with the month added when the range crosses one); the header’s accessible text is the full date. Today’s has aria-current="date".
<tbody> <th>Hour row headers with <time datetime="HH:00">
<td>Day/hour cell containing <hour-view> + events

Events

EventDetailDescription
week-view:event-click { date, time, text, element, category, duration } Fired when a <calendar-event> is clicked, or activated with Enter / Space while focused.
week-view:events-changed { events, source: 'property' } Fired after assigning the events property rebuilds the table.

JavaScript API

MemberDescription
events (get) The current events as data: { date, time, text, category?, duration? }[].
events (set) Replace every event and rebuild the table. time is HH:MM or a full ISO datetime, whose date is used when date is omitted. Emits week-view:events-changed.
refresh() Re-measure and re-position spanning events now.

Keyboard

KeyAction
Arrow DownNext event of the same day, in time order (including events that share an hour cell)
Arrow UpPrevious event of the same day, in time order
Arrow RightThe event closest in time on the next day that has any events (the previous day in right-to-left layouts)
Arrow LeftThe event closest in time on the previous day that has any events (the next day in right-to-left layouts)
Home / EndFirst / last event of the view, by date and then time
Enter / SpaceFire week-view:event-click for the focused event

Every placed event can be reached with the arrow keys. Events are one roving tab stop, starting on the first event by date and time. Each gets role="button" (role="group" when it holds links or controls of its own) and an accessible name from its time and title (author-supplied role / aria-label are kept).

Accessibility

  • The grid is a real <table>: day headers are <th scope="col"> named with the full date, hour labels are <th scope="row">, and the corner header has visually hidden text (data-label-time).
  • Grid lines are logical borders, so they mirror in right-to-left layouts and stay visible in forced-colors (Windows High Contrast) mode.
  • Today is conveyed by aria-current="date" as well as colour and a thicker rule.

Progressive Enhancement

LayerWhat renders
HTML onlyCalendar events render as a flat list (readable without JS)
+ CSSCategory colours and event blocks; an authored table stays a plain bordered table
+ JSAuto table generation, the grid/subgrid layout (applied once upgraded), spanning events, click handling, keyboard nav

Related

↑