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

bdo

Overrides the current text direction, forcing text to render left-to-right or right-to-left.

Description

The <bdo> (Bidirectional Text Override) element forces the characters inside it to be laid out in a specified direction, overriding the Unicode Bidirectional Algorithm. The dir attribute is required and must be ltr or rtl.

You rarely need it. The bidirectional algorithm already displays Hebrew, Arabic and other right-to-left text correctly inside a left-to-right paragraph (and vice versa). <bdo> is only for the uncommon cases where you want to override that and force a character order. For isolating text of unknown direction (user names, user-generated content), use <bdi> instead.

When to Use

  • Showing characters in storage order: displaying how right-to-left text is stored in memory, for teaching or debugging
  • Displaying reversed text deliberately, such as mirror writing
  • Correcting direction when the algorithm gets it wrong, typically for text that has lost its directional context (e.g. data from a legacy system stored in visual order)

When NOT to Use

  • To embed right-to-left text in a left-to-right paragraph — the bidirectional algorithm handles that; mark the text with <span lang="he" dir="rtl"> or <bdi>
  • For user-generated content — use <bdi> (auto-detection is safer)
  • For entire page direction — use dir="rtl" on <html>

Examples

Always add lang to text in another language, such as Hebrew (lang="he"), so screen readers pronounce it correctly (WCAG 3.1.2, Language of Parts).

Attributes

Attribute Description
dir Required. Text direction: ltr (left-to-right) or rtl (right-to-left). dir="auto" is not allowed on <bdo>, because an override needs an explicit direction.

Also supports global attributes.

CSS

VB adds no styling and no unicode-bidi rules. The browser's default, isolate-override, forces the direction inside the element and isolates it from the surrounding text.

Accessibility

<bdo> affects visual presentation only. Screen readers read the text in its logical (source) order, not the visual order: reversed “Hello World” is still read as “Hello World”. Be cautious using <bdo> purely for visual effects, because sighted and non-sighted users get different content.

Related

  • <bdi> — Isolates text without forcing direction (safer for unknown text)
  • <q> — Inline quotations with locale-aware quote marks
  • Internationalization guide — Full i18n reference including logical properties and reading direction utilities
  • dir — The attribute bdo requires
↑