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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10808

--- Comment #24 from Maciej Stachowiak <mjs@apple.com> 2010-10-23 00:05:00 UTC ---
(In reply to comment #22)
> (In reply to comment #18)
> > 
> > (1) Should the scan be redone if the contents of the element change (e.g. due
> > to DOM manipulation), rather than only doing it once?
> 
> Yes.
> 
> > (2) Should the scan consider CSS generated content (e.g. markers, :before
> > content, text transforms, etc) instead of just looking at the raw text?
> 
> No.
> 
> > (3) Should the scan exclude text that is "display: none" and therefore is not
> > rendered?
> 
> No.

It doesn't make sense to me that bidi direction would be affected by DOM text
contents instead of the text that will actually be visible to the user. What if
the first child of an element with dir=auto is something like <style scoped> or
<script> which contains text that is essentially never presented? What if the
child is an element with the hidden attribtue set (meaning it is irrelevant
semantically, not just hidden visually)? It seems illogical that such text,
which is by definition not presented to the user, would affect determination of
the text direction. So the only logical conclusion is that auto-direction
should be applied to the computed text, not the original text.

Are your answers to (2) and (3) based on what would make sense for authors and
users, and not just trying to enforce a CSS design constraint? If so, please
explain why that behavior would be logical.


> > My answer to all three questions would be "yes", which is why I think this
> > needs to be at the CSS layer, rather than just the HTML layer.
> 
> It should be an invariant in the design of bidi features that bidi resolution
> does not depend on CSS. In other words, bidi should resolve exactly the same
> whether the author-level style sheet has been enabled or disabled.

What's the reason for this invariant?

> 
> In reality, CSS block boundaries determine bidi boundaries, and so CSS will
> have an effect on bidi resolution if the author is playing with unorthodox
> display values and suchlike; however, the bidi dependence on CSS should be
> minimized.

In practice, the bidi algorithm is applied by the text layout system, which
operates on the "computed" text, i.e. the text as it will be presented to the
user, not the original text contents of the DOM. It would be inconsistent for
this one aspect of bidi to be based on DOM text contents instead.

-- 
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 Saturday, 23 October 2010 00:05:04 UTC