[Bug 10818] i18n comment 14 : title and alt attribute direction and two new attributes: titledir and altdir

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

--- Comment #15 from Aharon Lanin <aharon.lists.lanin@gmail.com> 2010-11-03 16:58:31 UTC ---
(In reply to comment #13)
> I don't think that having an attribute for each freeform text attribute to
> specify its direction (and presumably another to specify its language) is a
> scalable solution or particularly good language design.

Granted. Which is why it would have been better to make all freeform text
attributes elements instead, but it's a little late for that.

> I don't see why we'd discourage people from using bidi formatting characters in
> freeform (markup-free) text.

Some of the reasons for discouraging formatting characters whereever HTML
allows mark-up are explained in bug 10809, comment 31.

Obviously, we can not and do not discourage their use in places where mark-up
is not allowed, such as these attributes, but that does not mean that they are
truly a good solution.

1. Users (especially not very technical ones) are very good at making balancing
mistakes with the formatting characters. They are even better at letting them
go out of balance when they edit the text later.

2. Browsers usually let the underlying platform handle the tooltip text in a
native control. Many platforms, however, display them inappropriately if
support for "complex scripts" has not been enabled, and by default it isn't. As
a result, browsers often wind up displaying these characters inappropriately on
LTR systems. (As you have indicated in the discussion on bug 10816 leading to
its rejection, browsers can not even be accused of violating any spec, e.g. the
Default Ignorable Code Points requirement of the Unicode Standard, since the
bug is in the underlying OS, not in the browser.) As a result, one has to be
very careful about using formatting characters in title and alt, i.e. not to
use them to declare the direction of a pure LTR title, since doing so will help
on the RTL systems, but do harm on many LTR systems.

> Bidi named character references seem reasonable to
> me (but file another bug if you want them).

As indicated above, I do not want them.

> I don't really follow why you'd
> need to dynamically change the direction of an "alt" attribute

Nor do I - did I seem to suggest that somewhere?

> or why doing so
> is easier with an attribute than using bidi formatting characters.

See above. In brief, using bidi formatting characters is a nightmare.

> The problem described also seems already solvable using nested elements.

For title, this is true, but a little-known workaround. For alt, the workaround
does not work, since the alt needs to be specified on an <img>, not on a <span>
around it. On the other hand, setting the alt's direction directly on the img's
dir attribute currently does not seem to have any effect except the desired one
for the alt, but this is not entirely obvious, and is also a workaround.

As indicated above though, I do see your point about this change not being
particularly good language design.

-- 
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 16:58:34 UTC