Accessibility Wiki

Right-to-left content must declare its direction

Rule rtl-direction-declared · Document, language & navigation · impact serious · Static + live

↩ Back to the rules index · WCAG cross-reference

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

✕ Fails
<html lang="he"><body><p>שלום</p></body></html>
✓ Passes
<html lang="he" dir="rtl"><body><p>שלום</p></body></html>

Example

✕ Fails
<p lang="ar">مرحبا</p>
✓ Passes
<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.

Understanding 1.3.2

Standards

This rule contributes to the following standards:

WCAG A EN 301 549

Standard Criteria
EN 301 549 9.1.3.2

References

Generated from the EqualWeb accessibility engine’s rule metadata. Back to top ↑