W3C home > Mailing lists > Public > public-i18n-bidi@w3.org > January to March 2013

[Bug 17835] The directionality of a textarea should be determined based on its parent if its value does not have any strong characters

From: <bugzilla@jessica.w3.org>
Date: Tue, 19 Feb 2013 08:09:23 +0000
To: public-i18n-bidi@w3.org
Message-ID: <bug-17835-3860-RxtwfaMWye@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17835

--- Comment #6 from Aharon Lanin <aharon.lists.lanin@gmail.com> ---
(In reply to comment #5)
> The directionality of <textarea> basically determines only the
> directionality sent in form submission (if dirname="" is given) and the
> directionality of the title="" tooltip and placeholder="" message.

It also determines the direction style, and through that affects things like
the side on which the caret appears in an empty <textarea> (as specified for
unicode-bidi:plaintext), as well as the side on which its scrollbar and its
resizing control appear (even though those are not part of any spec). It is
those effects that prompted this bug to be filed.

> I'm fine with defaulting to inherited if the element is strictly empty, but
> then shouldn't we also do that for regular elements with dir=auto?

In my current opinion (this differs from what I expressed earlier), defaulting
the directionality of a textarea or input with dir=auto to be inherited when
its value is empty will usually result in a better user experience when the
element appears in an RTL context:
- The caret would appear on the right, which is better (i.e. does not result in
a caret jump) when the user enters RTL text, which is presumably the more
common case in an RTL page.
- Although this is not governed by any spec, in all current browsers the
scrollbar would appear on the left. This, once again, is better (scrollbar does
not jump) in the more common case that the user enters RTL text.
- The resize control would appear on the left, which usually (but not always,
see comment #8) makes it work better (but this is browser-dependent and not
governed by any spec).

The same probably applies to a contentEditable element with dir=auto.

For dir=auto elements that do not allow user input (i.e. neither
contentEditable nor <textarea> nor <input>), inheriting directionality when the
content to which the first-strong algorithm is to be applied is empty also
seems to be somewhat better. The use case there would be something like the
chat example at the bottom of
http://www.w3.org/html/wg/drafts/html/master/dom.html#the-dir-attribute. When a
chat entry is empty, it would be best to display the chatter's name on the
start side relative to the page. It's not a biggie by any means, but it's a
"pro".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 19 February 2013 08:09:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 February 2013 08:09:24 GMT