rtl-and-bidi-layout-pitfalls
Step 6 of the pipeline (WORKFLOW.md), for the two ways a right-to-left locale breaks a page that works in
English: the layout (what sits on which side) and the text (where a value from one direction lands inside a
sentence of the other). vue-nuxt-vuetify-conventions §6 (point 20) already says that a right-to-left locale is a
layout property and not a mirrored stylesheet; this block adds the settings, the one allowed mirroring rule, the
hidden-text pattern and the message side. The two sections share one premise: direction is data attached to a
locale, a message and a value, and everything that guesses it from the page or the characters guesses wrong
somewhere. This is a short block built on a thin set of sources, listed in
references/origin.md together with what was left out for lack of a file to read.
When
- A right-to-left locale is added, or a design is reviewed for one.
- A sentence contains a name, a number, a price or a code in a script of the other direction, and punctuation or
order looks displaced.
- A hidden label, skip link or description appears in the wrong place once the page is right-to-left.
- A component library is chosen for a product that will ship in Arabic or Hebrew.
Steps
Read only the section the task meets. They are independent.
| § |
Covers |
Read it when |
File |
| 1 |
Layout: where direction is set and where it comes from, logical properties, arrows, hidden text, components |
a page or component is made to work right-to-left |
01-direction-and-layout.md |
| 2 |
Text: spillover, isolating each value, direction metadata, formatter marks, a pseudo right-to-left locale |
values of one direction sit inside sentences of the other |
02-bidirectional-text.md |
Output / checkpoint
Each rule was exercised, not read off the file: the page was opened with a real right-to-left locale and with the
pseudo locale, every screen was checked for sides, arrows and hidden text (§1), and one sentence per message that
holds a value was rendered with a left-to-right name, a number and a price inside right-to-left text and the
punctuation stayed next to the right word (§2). A page seen only in English is not verified.
Guardrails
- Never hard-code a list of right-to-left languages when the script data says it (§1.1).
- Never mirror every icon; mirror directional arrows with one rule keyed on the direction (§1.2).
- Never hide text by positioning it off screen or with a negative indent (§1.3).
- Never assume a component library is right-to-left ready (§1, last subsection).
- Never join formatted pieces into a sentence yourself, and never strip the invisible direction marks a formatter
added (§2.1).
- Never infer the direction of a value by looking at its characters (§2.1).
- This block states guidance and library behaviour as of the sources read on the date in
references/origin.md. The MessageFormat 2 specification and the Pontoon page were
used for facts only, in our own words. Nothing was run while writing it.
Origin
Rewritten from the hardening reference of the Impeccable skill (Apache-2.0), the hide-content post of the A11y
Project (Apache-2.0 file, no separate content licence: all rephrased), the bidirectional text section of the
Unicode MessageFormat 2 specification (facts only), the Lingui pseudo-locale configuration (MIT), the Nuxt i18n
locale options (MIT), the Pontoon new-locale documentation (BSD-style licence) and the GOV.UK language navigation
page (MIT), read 2026-10-16. 🟡: never run by us; open points are in
references/origin.md.
1---2name: rtl-and-bidi-layout-pitfalls3description: "Use when a product adds or reviews a right-to-left locale such as Arabic or Hebrew, or mixes scripts of both directions in one sentence: direction set per locale and taken from script data, logical CSS properties, mirroring directional arrows with one rule, visually hidden text that survives right-to-left, design-system components that are not right-to-left ready, isolating each formatted value inside a message, and testing with a pseudo right-to-left locale before translations exist."4metadata:5 source: https://skillmd.com/skills/techmefr/rtl-and-bidi-layout-pitfalls6---78# rtl-and-bidi-layout-pitfalls910Step 6 of the pipeline (`WORKFLOW.md`), for the two ways a right-to-left locale breaks a page that works in11English: the layout (what sits on which side) and the text (where a value from one direction lands inside a12sentence of the other). `vue-nuxt-vuetify-conventions` §6 (point 20) already says that a right-to-left locale is a13layout property and not a mirrored stylesheet; this block adds the settings, the one allowed mirroring rule, the14hidden-text pattern and the message side. The two sections share one premise: **direction is data attached to a15locale, a message and a value, and everything that guesses it from the page or the characters guesses wrong16somewhere**. This is a short block built on a thin set of sources, listed in17[`references/origin.md`](./references/origin.md) together with what was left out for lack of a file to read.1819## When20- A right-to-left locale is added, or a design is reviewed for one.21- A sentence contains a name, a number, a price or a code in a script of the other direction, and punctuation or22 order looks displaced.23- A hidden label, skip link or description appears in the wrong place once the page is right-to-left.24- A component library is chosen for a product that will ship in Arabic or Hebrew.2526## Steps2728**Read only the section the task meets.** They are independent.2930| § | Covers | Read it when | File |31|---|---|---|---|32| 1 | Layout: where direction is set and where it comes from, logical properties, arrows, hidden text, components | a page or component is made to work right-to-left | [`01-direction-and-layout.md`](./references/01-direction-and-layout.md) |33| 2 | Text: spillover, isolating each value, direction metadata, formatter marks, a pseudo right-to-left locale | values of one direction sit inside sentences of the other | [`02-bidirectional-text.md`](./references/02-bidirectional-text.md) |3435## Output / checkpoint36Each rule was exercised, not read off the file: the page was opened with a real right-to-left locale and with the37pseudo locale, every screen was checked for sides, arrows and hidden text (§1), and one sentence per message that38holds a value was rendered with a left-to-right name, a number and a price inside right-to-left text and the39punctuation stayed next to the right word (§2). A page seen only in English is not verified.4041## Guardrails42- Never hard-code a list of right-to-left languages when the script data says it (§1.1).43- Never mirror every icon; mirror directional arrows with one rule keyed on the direction (§1.2).44- Never hide text by positioning it off screen or with a negative indent (§1.3).45- Never assume a component library is right-to-left ready (§1, last subsection).46- Never join formatted pieces into a sentence yourself, and never strip the invisible direction marks a formatter47 added (§2.1).48- Never infer the direction of a value by looking at its characters (§2.1).49- This block states guidance and library behaviour as of the sources read on the date in50 [`references/origin.md`](./references/origin.md). The MessageFormat 2 specification and the Pontoon page were51 used for facts only, in our own words. Nothing was run while writing it.5253## Origin54Rewritten from the hardening reference of the Impeccable skill (Apache-2.0), the hide-content post of the A11y55Project (Apache-2.0 file, no separate content licence: all rephrased), the bidirectional text section of the56Unicode MessageFormat 2 specification (facts only), the Lingui pseudo-locale configuration (MIT), the Nuxt i18n57locale options (MIT), the Pontoon new-locale documentation (BSD-style licence) and the GOV.UK language navigation58page (MIT), read 2026-10-16. 🟡: never run by us; open points are in59[`references/origin.md`](./references/origin.md).