W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: authoring @lang and @dir (was 3.6. The root element)

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 2 Aug 2007 00:21:41 -0700
Cc: Sander Tekelenburg <st@isoc.nl>, public-html@w3.org
Message-Id: <0824F4AF-D34F-4783-B906-DD5D0CEA6AAA@apple.com>
To: Robert Burns <rob@robburns.com>

On Aug 1, 2007, at 8:53 PM, Robert Burns wrote:

> I'm not really sure what you're asking. But what I'm trying to say  
> is that fully expressing a language using @lang or @xml:lang  
> provides all of the information required to deduce the  
> directionality. So to take just one of the examples I gave above:
> lang='iw-LATN'=> dir='LTR'
> In that case the @dir attribute is technically redundant. I'm not  
> saying that UAs work that way now. Rather I'm saying that by  
> specifying language (including the specification of unconventional  
> scripts), all the information is there to determine directionality.  
> For some languages what demarcates the unconventional script may be  
> up for debate and can even be a political football. If the web was  
> around a century ago or so when Turkey was imposing a change from  
> Arabic to Latin script, it would be difficult to say which was the  
> conventional script. It would probably require specifying precisely  
> which one was in use either way (if the government permits it).
> Again, though having @dir as a separate attribute saves UAs from the  
> need to process language codes to determine directionality. It also  
> is more flexible in the sense that an author can specify only @dir  
> and leave @lang unspecified. Or specify @dir and @lang but provide  
> only the primary language code with no script code. Doe that answer  
> your question?

HTML4 says that "User agents must not use the lang attribute to  
determine text directionality", and current user agents respect this.  
It is highly likely that content depends on lang and dir being treated  
separately. So reversing this requirement in HTML5 would likely not be  
compatible with existing content.

Note that dir only affects directionally neutral characters, not  
characters from scripts with inherent directionality, so there are  
valid reasons to write text in various languages that uses either dir  

Received on Thursday, 2 August 2007 07:21:49 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:25 UTC