[html5] bdi and bdo element

Veli Senol senol.veli at gmail.com
Tue Dec 2 11:49:46 PST 2014


Hello, it is hard to understand what the difference between bdo and bdi is,
since there is no example for bdo, also just one example for bdi, this
is not sufficient.

Now after studying the articles at WHATWG and some other resources in
german and also doing tests I am close to catch it, but there are some
questions confusing me:

Note: On german resources where people try to explain these elements,
are a lot of failures in their explanations, that shows they didn´t
understood it right.

Also there are a lot of variety in their explanations very different
to other resources.


The correct usage for the purposes of BiDi text formatting in form elements is:

<p>Name: <input id="name" dir="auto"></p>

Is that right?


If we got an html document and all contents are for example in arabic,
then we should do it this way, right?:

<html lang="ar" dir="rtl">
...
</html>


if we got an html document where the main contents are for example in
english but we got a section or paragraph in arabic we should use:

<html lang="en">
<p lang="ar" dir="rtl">...</p>
</html>

right?

if we got an html document where nearly all contents are in english
but in one paragraph there is a span of text in arabic, surrounded by
english text, we should use:

<html lang="en">
<p>This is a span of text in english <bdo dir="rtl">إيان إيان
إيان</bdo> and another span of text in english</p>
</html>

Is that right? Think so, because the recommondation is explaining if
we know there is text in another directionality and we know the
direction we should mark that text with bdo.

Ok but there is a Problem if the text after </bdo> begins with a
number, similar to the example given in WHATWG for the bdi-element,
the difference is, think of it is not user generated content, the
author knows that this span of text has rtl direction:

<html lang="en">
<p>This is a span of text in english <bdo dir="rtl">إيان إيان
إيان</bdo> 55555 and another span of text in english</p>
</html>

This is not working, but the following is working:

<p>This is a span of text in english <bdo dir="rtl">إيان إيان
إيان</bdo> <bdo dir="ltr">55555 and another span of text in
english</bdo></p>

And this is also working:

<p>This is a span of text in english <bdi>إيان إيان إيان</bdi> 55555
and another span of text in english</p>

The last two codes above are not recommended in spec or is it the right way?


Hope to get help, and I am sry for my english, that isn´t the best.

Veli Senol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20141202/6662738c/attachment.htm>


More information about the Help mailing list