Re: per-paragraph auto-direction, a.k.a. dir=uba

On 09/14/2010 04:43 PM, Aharon (Vladimir) Lanin wrote:
>  > Browsers have to deal with incremental rendering,
>  > meaning that they start rendering a document before it has completely
>  > loaded. It does not make sense for bidi resolution of a block of text
>  > to change if an element happens to load in later.
>
> On the face of it, this seems to make any kind of dir=auto (not just
> uba) difficult, since the first few descendant nodes received may not
> contain decisive content.

Right. But it's relatively rare to get tons of content without getting
any decisive content, whereas it's relatively common to get e.g. a
<div> with inline content that suddenly contains a block-level element.

> So, do we have to get rid of dir=auto or uba completely?

There's likely to be pushback on it due to implementation concerns, but
since there are solid, common use cases for these features, I don't think
we should drop them. However, that doesn't mean we should define behavior
that aggravates the situation.

> And if not, should we resurrect uba for elements with no child elements,
> not just <textarea>?

I object to that idea. It's not just more complex for UAs to have a list
of special elements that when loaded trigger a reformat, it's also more
confusing for authors and site visitors to have the sudden, inexplicable
shift when new content is added.

If there's a strong need for dir=uba on more elements, then we can define
it to apply only to the direct contents those elements and not to
descendant content. That's acceptable. It doesn't upset already-rendered
content. But I don't really see a strong use case for dir=uba behavior
on anything other than <textarea> and <pre>. They are designed to contain
unmarked-up text. Inside anything else, the author is supposed to be
marking up his text, and he may as well use proper <p>s with their own
'dir' attributes.

If after HTML5 there's a huge demand for more automagic bidi capabilities,
then we can revisit the issue then.

~fantasai

Received on Wednesday, 15 September 2010 00:15:59 UTC