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…
Generic inline container for phrasing content. Use only when no semantic element fits — for effects, status indicators, translation control, or accessibility helpers.
Description
The <span> element is a generic inline container with no inherent semantics. Like <div> for block content, <span> should be used only when no semantic element fits the need.
Prefer semantic elements first:<em>, <strong>, <mark>, <code>, <time>, <data>, etc. But when the content doesn't fit any semantic category, <span> is the right tool.
When to Use
Legitimate uses of <span> in Vanilla Breeze:
Effect targets: Apply data-effect to a text range within a paragraph
Status indicators: The .status class for inline status dots
Translation control:translate="no" on brand names or identifiers
Visually hidden text:.visually-hidden for screen reader context
Block progress: The .block-progress Unicode meter pattern
Styling hooks: When CSS needs an inline target that has no semantic equivalent
For headings, navigation, or layout — always use the semantic element
Examples
Effect Targets
When a VB effect needs to wrap a text range inside a paragraph, <span> is the correct container:
Effect target
1234
<p>This text has an<spandata-effect="highlight"data-trigger="scroll">animated highlight</span> effect applied.</p>
Status Indicators
The .status class creates an inline status dot using a ::before pseudo-element with Unicode characters. The glyph has empty alternative text (content: "\25CF" / ""), so screen readers read only the label, not “black circle”. The colour is a secondary cue; the label must say the state. Six states are available:
Use translate="no" on <span> to prevent machine translation of brand names, identifiers, and technical terms:
Translation control
12
<p>Install <spantranslate="no">Vanilla Breeze</span> via npm.</p><p>Your username is <spantranslate="no">tpowell42</span>.</p>
See the i18n guide for VB's full translation convention.
Visually Hidden Text
The .visually-hidden class hides text visually while keeping it accessible to screen readers. This provides context that sighted users get from visual cues:
Avoid using <span> when a semantic element exists:
Wrong vs right
1234567891011
<!-- Wrong: span for layout --><spanclass="header">Site Title</span><!-- Right: use semantic element --><h1>Site Title</h1><!-- Wrong: span for emphasis --><spanstyle="font-weight: bold">Important</span><!-- Right: use semantic element --><strong>Important</strong>
Accessibility
<span> has no inherent ARIA role or semantic meaning
Screen readers treat it as anonymous inline text
Add role, aria-label, or aria-live when the span carries meaning (e.g., status indicators, meters)
The .visually-hidden pattern is essential for providing screen reader context that sighted users get visually
Related
Typography guide — status indicators, block progress and other text utilities
<em> — Stress emphasis (preferred over styled span)
<strong> — Importance (preferred over styled span)
<mark> — Highlighted text (preferred over styled span)
<code> — Code content (preferred over styled span)
<data> — Machine-readable values (preferred over styled span)
<time> — Dates and times (preferred over styled span)