<bdi>: The Bidirectional Isolation element

The example on the <bdi> page says:

<p dir="ltr">This arabic word <bdi>ARABIC_PLACEHOLDER</bdi>
is automatically displayed right-to-left.</p>

I believe the intent is to put an Arabic example there, like:

<p dir="ltr">This arabic phrase <bdi>.مثال بالعربية</bdi>
is automatically displayed right-to-left.</p>

Is that right? should I edit the page?

Yeah, the example is wrong, and the explanation is wrong. <bdi> doesn’t do right-to-left layout, it creates a new context for the bidi algorithm. That way, things like punctuation marks align to the text inside the bdi, and not the surroundings.

@zbraniecki, do you have a good example in your toolbox?

yeah, that’s why I put a dot at the end of the Arabic example

The reason why that text is in English is to allow English readers to see that the characters are reversed. In theory. I don’t know that that actually works. :slight_smile: