Right-to-left content must declare its direction
Rule
rtl-direction-declared· Document, language & navigation · impact serious · Static + live
Why it matters
A lang attribute names the language but never sets the writing direction — dir does. Hebrew, Arabic, Persian and Urdu marked only with lang still lay out left-to-right: punctuation lands at the wrong end of the line, embedded numbers and Latin words are re-ordered, and the sequence the content is read in stops matching the sequence it was written in.
How to fix
Add dir="rtl" to <html> for a right-to-left page, or to the element that introduces the right-to-left run. Use dir="auto" when the direction depends on user-supplied content.
Example
<html lang="he"><body><p>שלום</p></body></html>
<html lang="he" dir="rtl"><body><p>שלום</p></body></html>
Example
<p lang="ar">مرحبا</p>
<p lang="ar" dir="rtl">مرحبا</p>
WCAG success criteria
1.3.2 Meaningful Sequence — Level A
When the order of content affects meaning, the DOM/reading order must match the intended visual order.
Standards
This rule contributes to the following standards:
WCAG A EN 301 549
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.1.3.2 |