Re: browsers + arrow keys + bidi

Ah😀 Yes. Good point.

Here is a more detailed explanation of my thinking. I will stick with forward for right arrow key and back for the left arrow key.

Again using the last 2 text boxes in my jsfiddle and forgetting about text selection at the moment, forward will move the cursor through the text from left to write and back will move the cursor from right to left. This takes no account of bidi. It is working on display order.

Now onto selection using shift and forward and back arrow keys. This is where we now need to take account of bidi. Forward key moves away from the beginning of the text towards the end of the text string. Back key moves away from the end of the text string towards the beginning of the text string. This is done in memory order and not display order. So, whether the text is English or Hebrew the forward and back keys are behaving correctly in Firefox (IMHO).

Using Firefox, I will give 2 examples where my cursor starts between b and c.

ltr textbox: shift forward forward forward will select cdא

rtl textbox: shift forward forward forward will select cdא

Both are working as I think they should work and are culturally correct in both cases.

If I place my cursor within the hebrew and shift forward to select, it is culturally correct as it is moving towards the end of the Hebrew text.

AndrĂŠ Schappo

On 28 Feb 2018, at 16:43, Phillips, Addison <addison@lab126.com<mailto:addison@lab126.com>> wrote:

Why do you prefer the way Firefox behaves?

First, Firefox clearly has a cursor selection bug. Cursor-selecting in a single direction should end up with the whole string selected and it doesn’t in FF.

But more to the point: why do you think “right” means “forward”? In an RTL context (which implies an RTL language or culture), right means *back*. Your attribution of “forward” or “back” to the directions “left” and “right” is culturally/linguistically linked. Otherwise, RTL users constantly have to think about the fact that the “forward” arrow points in the wrong direction!

Addison

From: Andre Schappo [mailto:A.Schappo@lboro.ac.uk]
Sent: Wednesday, February 28, 2018 2:57 AM
To: www International <www-international@w3.org<mailto:www-international@w3.org>>
Subject: browsers + arrow keys + bidi


When dealing with bidi text I think of right arrow key as forward arrow and left arrow key as back arrow.

Looking at the last 2 textboxes in the results window at jsfiddle.net/coas/qa8190kn<http://jsfiddle.net/coas/qa8190kn> The first of these 2 is ltr and the last is rtl.

Now select some text in the ltr textbox using shift and forward arrow, say starting at the boundary between b and c. All the browsers behave as I expect. They are all working on memory order and they are all selecting the text I expect.

It is with the rtl textbox that there are differences. Of the browsers I tried, Firefox is the only one to behave as I expect ie shift + forward behaving the same and selecting the same text as in the ltr textbox. With the other browsers I tried, I had to use back arrow to select the same text.

I prefer the way Firefox behaves. Is there a standard for browser behaviour under these circumstances?

AndrĂŠ Schappo

Received on Thursday, 1 March 2018 18:53:21 UTC