[Bug 16160] New: dir=auto does not work for user-visible attribute values

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16160

           Summary: dir=auto does not work for user-visible attribute
                    values
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: aharon.lists.lanin@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Currently, the HTML5 spec says that "Text from elements (either attribute
values or the contents of elements) is expected to be rendered in a manner that
honors the directionality of the element from which the text was obtained."

While this is generally useful, it does not make sense for elements whose
directionality was determined using dir=auto (on the element or an ancestor),
since the directionality of an element with dir=auto is chosen on the basis of
descendant text nodes and is completely unrelated to the value of the
attributes in its scope of influence. The dir=auto feature is designed for use
in web application that need to plop some text of unknown direction into the
page. There is no reason to assume that the title on the element holding this
text is also "plopped in" data; in fact, it is more likely to be an explanation
in the page's own language of what got plopped in.

The situation is exacerbated by there being no way to specify the
directionality of attribute values except wrapping them in LRE|RLE and PDF,
which were never designed for human use. This has been reported as
https://www.w3.org/Bugs/Public/show_bug.cgi?id=10818 and
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15488.

The converse situation, when the data of unknown directionality needs to be
used   for a user-visible attribute, is even more problematic: there is no way
to get the user agent to base the directionality of an attribute on its own
value.

This problem has been discussed on public-18n-bidi@w3.org, and we would like to
suggest a potential solution for all three problems (i.e. dir=auto having
unintended results on user-visible attribute values, no dir=auto for
user-visible attribute values, 3. and no way to declare the directionality of
user-visible attributes).

We propose a new attribute, attribsdir="ltr|rtl|auto", which would determine
the directionality in which an element's attributes (for example title, alt,
and placeholder) must appear when displayed to the user:

 * attribsdir="ltr": the directionality of the element's attributes is 'ltr'
 * attribsdir="rtl": the directionality of the element's attributes is 'rtl'
 * attribsdir = "auto": the directionality of each of the element's attributes
must be computed based on that attribute's value. If an attribute's value
contains a character of bidirectional character type AL or R, and there is no
character of bidirectional character type L anywhere before it in the
attribute's value, then the directionality of the attribute is 'rtl'.
Otherwise, the directionality of the attribute is 'ltr'.
 * attribsdir not specified:
    o If the element has dir=auto (explicitly or by default, as is the case for
the bdi element), or if the element inherits its directionality from such an
element, then the directionality of each of the element's attributes must be
computed as if attribsdir="auto" had been specified.
    o Otherwise, the directionality of the element's attributes is the same as
the element's directionality.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Thursday, 1 March 2012 14:12:04 UTC