Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: 'dir' attribute on BIDI inline elements and actual browsers

From: Helmut Wollmersdorfer <helmut@wollmersdorfer.at>
Date: Wed, 20 Dec 2006 15:29:13 +0100
Message-ID: <458948B9.1090801@wollmersdorfer.at>
To: www-html@w3.org

Paul Nelson (ATC) wrote:
> The Unicode Bidirectional algorithm(http://www.unicode.org/reports/tr9/ )
> provides the guidance on how to process this. The correct layout is [1].

Unicode BIDI is the low level protocol, which cannot give an answer 
about HTML.

> Because the Hebrew is a RTL script, the addition of the span does
> nothing to change the layout. One could just as easily have put: 

> <p>English1 &#1506;&#1489;&#1512;&#1497;&#1514;2. 
> &#1506;&#1489;&#1512;&#1497;&#1514;3 
> Englisch4.</p>

A first reader of http://www.w3.org/TR/html401/struct/dirlang.html#h-8.2  
will only mark the Hebrew words with 'dir', similar to the well known 
usage of other inline markup, e.g. <b> or <em>. And he would expect the 
'. ' (dot-space) to be in the style of the parent element.

In the specs of HTML the above enclosing is given as example:

| Thus, to express a Hebrew quotation, it is more intuitive to write
|
| <Q lang="he" dir="rtl">...a Hebrew quotation...</Q>

If the authors of the HTML spec intended layout [1], then this is not 
'KISS' (Keep It Simple, Stupid). This needs a HTML author to know the 
details of the Unicode BIDI algorithm, especially all the neutral and 
weak characters.

Another symptom, that this part of the HTML spec needs re-design and/or 
re-wording, is the large amount of test cases, FAQs, bugs, inconsistancy 
across browsers etc.

> If you wanted the layout of [2], you can do the following to force the
> right bidirectional embedding:

> <p>English1 &#1506;&#1489;&#1512;&#1497;&#1514;2. 
> <span dir=ltr>&#1506;&#1489;&#1512;&#1497;&#1514;3 
> Englisch4.</span></p>

This is not an intuitive solution. Common sense would place the <span 
...> between '2' and '.', because the neutral '. ' should be forced LTR. 
Or include only the '. ' into a <span ...>.

Helmut Wollmersdorfer
Received on Wednesday, 20 December 2006 14:29:45 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.