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 block-level container. In Vanilla Breeze, div usage is discouraged — prefer semantic elements and VB layout primitives.
Philosophy
Vanilla Breeze takes an intentional stance: <div> is a last resort, not a default. The VB conformance checker flags every <div>: as an error in newly added files and as a warning in existing ones. The separate semantic check reports classed divs as informational suggestions.
This is not about being pedantic — semantic elements provide:
Accessibility: Screen readers can navigate by landmarks (<nav>, <main>, <aside>)
SEO: Search engines understand content structure from semantic markup
Readability: Code is self-documenting when elements describe their purpose
Less CSS: VB styles semantic elements directly — no class soup
Semantic Alternatives
For every common <div> pattern, a semantic element exists:
<!-- Instead of <div class="card"> --><article><h3>Card Title</h3><p>Self-contained content.</p></article><!-- Instead of <div class="sidebar"> --><aside><p>Tangentially related content.</p></aside><!-- Instead of <div class="nav"> --><navaria-label="Primary"><ulclass="unstyled"><li><ahref="#">Home</a></li></ul></nav><!-- Instead of <div class="footer"> / <div class="actions"> --><footer><buttontype="button">Save</button></footer>
Layout Without Divs
VB's layout attributes (data-layout) and custom elements (<layout-stack>, <layout-grid>, etc.) can be applied directly to semantic elements:
Layout on semantic elements
1234567891011
<!-- Instead of <div data-layout="stack"> --><sectiondata-layout="stack"data-layout-gap="m"><p>Content with vertical spacing.</p><p>No wrapper div needed.</p></section><!-- Instead of <div data-layout="grid"> --><uldata-layout="grid"data-layout-gap="m"><li>Grid item one</li><li>Grid item two</li></ul>
When no semantic element fits, VB layout custom elements (<layout-stack>, <layout-grid>, <layout-cluster>) serve as the container — they are more descriptive than <div> because they declare layout intent.
Legitimate Uses
There are a few cases where <div> is the correct choice:
<dl> grouping: HTML5 allows <div> inside <dl> to group <dt>/<dd> pairs (for striped styling)
Third-party widgets: When external libraries require a container div
CSS Grid/Flex children: When you genuinely need a non-semantic grid cell
Legitimate div uses
1234567891011121314151617
<!-- dl grouping (HTML5 spec allows div inside dl) --><dldata-striped><div><dt>Term</dt><dd>Description</dd></div></dl><!-- Radio/checkbox groups do NOT need a div: lay out the options with a layout primitive inside the fieldset --><fieldset><legend>Options</legend><layout-stackdata-layout-gap="s"><label><inputtype="radio"name="opt" /> Option A</label><label><inputtype="radio"name="opt" /> Option B</label></layout-stack></fieldset>
The conformance checker exempts <div> elements that are direct children of <dl> automatically — no allowlist entry is needed for them.
Conformance Enforcement
VB enforces semantic HTML through automated tooling:
Conformance rules
# VB conformance checker flags divs:vb/no-div — Any <div> (error in new files, warning in existing ones)vb/no-div-wrapper — <div> wrapping a single semantic child (same severities)semantic/no-div — Classed <div> with a suggested alternative (info)
vb/no-div — Flags any <div> element except <dl> > <div> groupings. Suggests semantic alternatives. It is an error in files that are new to the repository and a warning in existing files.
vb/no-div-wrapper — Flags <div> wrapping a single semantic child (the div is unnecessary).
Allowlist: Known legitimate uses can be added to scripts/vb-conformance-allowlist.json (rule name → list of file paths). Allowlisted files are downgraded to warnings rather than skipped.
Run npm run conformance to check your HTML files.
The VB Refinement Checklist
When auditing existing code with divs, follow this order:
Div audit: Can each div be replaced with a semantic element?
Wrapper audit: Is a div wrapping a single child that could receive the attributes directly?
data-layout audit: Is data-layout on a div when it could be on the semantic parent?
Class audit: Are VB element-scoped classes available (e.g., form.stacked)?
Semantic opportunities: Can <footer> replace a button group div? Can <header> replace a title wrapper?
Accessibility
<div> maps to the generic ARIA role: its content is read normally, but the element itself conveys no meaning and is not a landmark
Screen readers cannot navigate by divs; they can navigate by landmarks, headings, lists, and other semantic elements
Every div you replace with a semantic element improves the accessibility tree
Related
<span> — Generic inline container (same philosophy: last resort)