[Bug 10807] i18n comment 1 : new attribute: ubi

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

--- Comment #26 from Aharon Lanin <aharon.lists.lanin@gmail.com> 2010-11-03 18:49:51 UTC ---
(In reply to comment #22)
> In general, it seems like a <bdi> element is the way to go.

1. Regarding the attribute-vs-element issue, I still prefer attribute as the
more easily used and less disruptive solution, but you are the HTML expert, and
I defer to you.

If it is going to be an element, perhaps we could make dir=auto the default for
it? It would be needed most of the time, it can be overriden with an explicit
dir value, and there is no backward compatibility problem. (Note we still need
dir=auto itself for the cases where you want it to affect the alignment of a
block element.)

2. Regarding the name, I am wondering why you seem to prefer bdi over ubi. The
name originally suggested (about a year ago) was indeed bdi, but people saw a
couple of problems with it (leading to the switch to ubi):

- Could be confused with bdo.

- Could be confused with the term "bidi" generally. Although that is not
necessarily bad, especially if it gets dir=auto by default...

> However, I think it would also make sense to make sure that <output> elements
> are always isolated (this is already in the spec)

Sounds good to me. I am not sure I would want the extra expense of dir=auto by
default on output, though, which has lots of use cases where bidi can not
possibly be a concern.

> and also that any element
> which has a lang="" attribute (regardless of value) should have this isolation
> behaviour.

No, see below.

> > Also, it is possible that adding isolation by default would break existing
> > documents. This is also the argument against doing isolation by default any
> > time the dir attribute is set.
> 
> How could it break an existing document?
>
> Indeed, doing this automatically any time dir="" is explicitly set might not be
> a bad idea either... do we have any data on how many pages would change
> rendering if we did this?

Authors do not always know what they are doing, especially when it comes to
bidi. Consider the following:

i spoke to JOHN. <span dir=ltr>susan</span>, MIKE and ollie spoke to him too.

Of course, the dir=ltr on susan is unnecessary, while dir=rtl would have been a
good idea on JOHN and MIKE, but like I said, people often get really confused
when it comes to bidi. Currently, despite all the nonsense, it is rendered as
intended:

i spoke to NHOJ. susan, EKIM and ollie spoke to him too.

With isolation snuck in by default, though, one would get:

i spoke to EKIM ,susan .NHOJ and ollie spoke to him too.

Not convinced? Let's try this one, as might be output by a web app that is
trying to visualize some sort of relationship between FOO and BAR, which are
names from its database:

Summary: FOO <span dir=ltr>==&gt;</span> BAR

This gets rendered as

Summary: OOF ==> RAB

The dir=ltr on the ==> was put in to prevent it from being displayed as

Summary: RAB <== OOF

which might not be to the app UI designer's liking for some good reason. Of
course, another way to fix this would have been with an &lrm; somewhere between
FOO and BAR, but nearly no one knows how to use &lrm;. Also, dir=rtl on both
FOO and BAR would have been a good idea, but that would not have fixed the UI
designer's original problem, and it may be that they had not yet run into the
issue of the names themselves getting garbled yet, so they did not do it. This
scenario is very, very realistic. Unfortunately, the introduction of
isolate-by-default onto the dir=ltr will break their fix and make their
application suddenly regress.

> Might it not fix as many if not more
> documents than it breaks?

The breakage that one gets due to lack of isolation, when it happens, is quite
obvious. If the page gets any QA, it will be found and fixed, somehow - if
anyone cares enough about it. If the page doesn't get QA, it likely has a dozen
other bidi problems that we won't fix automatically. Besides, one bug added due
to lack of backward compatibility is worth about a hundred that got fixed "for
free" - but which apparently no one cared about enough to fix themselves.

I am therefore extremely against doing isolation automatically any time dir is
specified. If we were inventing the dir attribute today, I would be all for it,
but not as things stand today.

Similarly, I would not do it automatically when lang is specified. This has the
additional handicap of being unimportant due to the low incidence of lang
attribute use, especially inline.

-- 
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 Wednesday, 3 November 2010 18:49:53 UTC