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

See below

On Tue, Feb 28, 2012 at 8:16 PM, Najib Tounsi <ntounsi@emi.ac.ma> wrote:

> 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".
>

In the second case, the content being displayed RTL is *not *as expected.
It should be LTR because <bdi> is supposed to have dir=auto by default.
(See http://dev.w3.org/html5/spec/Overview.html#the-bdi-element, "Note: The
dir global attribute defaults to auto on this element ".) This is not
currently implemented in either FF or WebKit. There are bugs filed on both.


> 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 Wednesday, 29 February 2012 10:03:27 UTC