[Bug 18490] make any element with an explicit lang or dir attribute bidi-isolated by default

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18490

--- Comment #4 from Aharon Lanin <aharon.lists.lanin@gmail.com> ---
Recently I investigated the effects of the dir attribute in IE, and discovered
some significant new information (at least it was new to me) that affects the
conclusions I reached as described in comment 1.

It is true that no existing version of IE, including IE10, implements isolation
(i.e. unicode-bidi:isolate). However, it turns out that IE8 and up, unless it
is in IE7 compatibility or quirks mode, has modified the behavior of
unicode-bidi:embed that is non-standard and not interoperable with other
browsers, and in most cases acts similar to isolation.

This behavior appears to be that an inline element bearing the dir attribute
affects the visual ordering of its surroundings as if it were immediately
preceded by an invisible character of the element's directionality, but
immediately followed by an invisible character of the parent element's
directionality. Thus, 

<div dir="ltr">א ==> <span dir="rtl">*</span></div>

is displayed as

* <== א

which is as specified and the same as FF, WebKit, and IE7 and below, but

<div dir="ltr"><span dir="rtl">*</span> ==> ב</div>
<div dir="ltr"><span dir="rtl">*</span> ==> 123</div>

is displayed as

* ==> ב
* ==> 123

which is the opposite ordering from IE7, the spec, and from all other major
browsers.

This unusual approach cannot be said to approximate the standard embedding
semantics. While it certainly is not isolation either, its effects are actually
the same as isolation when both of the following conditions are satisfied:
- The dir attribute value assigned to the inline element is the opposite of its
parent element's directionality.
- If the first strong character preceding an inline element with a dir
attribute has the same directionality as that element, it too is inside an
inline element with a dir attribute.

These conditions are actually more commonly satisfied than not, because:
- It is usually redundant to put a dir attribute on an element if its parent
already has that directionality.
- If a software application creating a web page bothers to declare the
directionality of one piece of opposite-direction text that it needs to display
inline, it is likely to do the same for another.

Thus, once could say that under the most common circumstances, the behavior of
IE8 and up (when acting as IE8 and up) is closer to isolation than to
embedding. But even if that seems like a stretch, it is quite safe to say that
currently there is a lack of interoperability in the behavior of the dir
attribute between the current versions of IE and of the other major browsers
(which continue to follow the current HTML specification and give the dir
attribute embedding semantics).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 24 April 2013 02:58:51 UTC