W3C home > Mailing lists > Public > public-i18n-bidi@w3.org > January to March 2012

Re: dir=auto makes no sense for descendant user-visible attributes

From: Najib Tounsi <ntounsi@emi.ac.ma>
Date: Tue, 28 Feb 2012 18:16:38 +0000
Message-ID: <4F4D1A06.4010205@emi.ac.ma>
To: "Aharon (Vladimir) Lanin" <aharon@google.com>
CC: Matitiahu Allouche <matial@il.ibm.com>, "Martin J. Dürst" <duerst@it.aoyama.ac.jp>, Ehsan Akhgari <ehsan@mozilla.com>, public-i18n-bidi@w3.org
Aharon (Vladimir) Lanin wrote:
>  Oops, I just realized that there is a problem with the simplified
>  formulation. The <bdi> element has dir=auto by default. Thus, the
>  title in <html dir=rtl><bdi dir=auto title="C++"> will be displayed
>  as "C++", but the title in <html dir=rtl><bdi title="C++"> will be
>  displayed as "++C",

Am i missing something? I don't see the bug.

Try to put content inside <bdi>
<div dir=rtl><bdi dir="auto" title="C++">a &#x0627; b    
</span></bdi></div>
<div dir=rtl><bdi  title="C++">a &#x0627; b    </span></bdi></div>

In the first case, the element's content (<bdi>) is displayed LTR "a ا 
b" as expected by dir="auto".
So the attribute follows: shown as "C++".
In the second case, the content is displayed RTL "b ا a" as expected by 
dir="rtl" in <div>.  So "++C".

Tested on Webkit (Google chrome and Safari)

Najib

PS: Note incidentally that there is a small bug (?) on Google chrome. 
Spaces after the letter "b" are not ignored!



>  even though <bdi> is supposed to be the same as <bdi dir=auto>.
>
>  I am not sure how to fix this in the simplified formulation while
>  keeping it simple.
>
>  Please note that my formulation *with* the dir=auto exception does
>  not suffer from this problem. And I am still convinced that it will
>  usually give better results.
>
>  Thoughts?
>
>  Aharon
Received on Tuesday, 28 February 2012 18:13:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 28 February 2012 18:13:19 GMT