W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > October 2010

[Bug 10808] i18n comment 2 : new dir attribute value: auto, and a new attribute: autodirmethod

From: <bugzilla@jessica.w3.org>
Date: Tue, 19 Oct 2010 13:04:36 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1P8Bro-0005wP-Hz@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10808

--- Comment #15 from Aharon Lanin <aharon.lists.lanin@gmail.com> 2010-10-19 13:04:35 UTC ---
(In reply to comment #18 under bug 10807)
> Having dir values that don't map to CSS will be problematic for implementors,
> since the dir attribute is currently implemented 100% by mapping to CSS.
> Getting the right interaction with the values that *do* map to CSS would be
> particularly tricky. I expect the likely outcome would be to map to a
> nonstandard CSS value for the direction property.

I do not understand the reasoning for any of these conclusions. The
implementation would be to scan (part of) the element's content and to set the
CSS direction to either ltr or rtl. Seems simple enough, and the effects are
exactly what we want. (Except that we also want isolation on by default, but
that could actually be argued for most cases where an element has an explicit
dir attribute; the reason we are not suggesting it is that it would probably
break some existing documents.)

As far as I can remember what I was told by CSS experts, doing the estimation
in CSS is far more difficult to implement, with weird feedback loops, e.g. due
to the new CSS ability to select by direction.

> Maybe it would have been better if CSS never got involved in defining
> directionality, but that's not the world we live in. Having text direction
> controlled by a mix of CSS and non-CSS mechanisms is likely to be needlessly
> confusing and hard to implement.

Bidi is already controlled by parallel HTML and CSS mechanism that do not map
directly one to the other. It is indeed confusing, until you realize what is
actually going on: the right way to look at the role of HTML and CSS in bidi
matters is that the HTML is the high-level language and the CSS is the machine
language implementation. (I am only talking about the CSS bidi properties here,
not CSS generally.) Programmers are expected to write almost exclusively
high-level code, which is then implemented by the platform translating them
into simpler machine code constructs. The fact that you have a for loop, while
loop, and do-while loop in the high-level language does not mean that the same
constructs need to exist in the machine language. All you have there are
conditional and unconditional gotos.

Programmers should not generally be setting the CSS bidi properties (direction
and unicode-bidi) directly. W3C guidelines explicitly say so. One reason for
this is that the bidi properties of content are a part of the content's
metadata, not a matter of presentation. Another is that the CSS properties are
not designed to be user-friendly. For example, it mostly makes no sense to set
direction without setting unicode-bidi and vice-versa.

As far as I understand it, the reason that the CSS bidi properties exist is
that it is impossible to implement the bidi stuff without them: for the most
part, it can only be implemented in the CSS layer, but the CSS layer is not
supposed to know anything about specific HTML elements or attributes, so the
HTML layer needs to pass the information on to the CSS layer, and the only way
to do that is via CSS properties.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 19 October 2010 13:04:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:30:59 UTC