-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[focusgroup] i18n: should arrow key navigation follow text direction? #514
Comments
relevant related tabs research here I guess https://open-ui.org/components/tabs.research.parts#directionality-mirroring. |
It makes a lot of sense to me to have "forward/backward" map to typical conventions which can be configured with HTML's In any case, here's a first-attempt:
I think the logical interpretation of "horizontal" and "vertical" should be independent of these above mappings and continue to constrain left/right under the term "horizontal" and top/bottom under the term "vertical". |
In testing Bidi text with Window's "notepad" application, the caret movement does seem to support this next/prev notion, though it seems counter-intuitive to the "logical" direction of the arrow: |
We can state this more simply by saying that the default (unconstrained) focusgroup behavior associates the four arrows with "previous" or "next" depending on whether they point in the "block/inline-start" or "block/inline-end" directions on the focusgroup element associated with the currently-focused element.
That seems opposite to what we want, no? It looks like those directions are purely "left = prev, right = next", which produces the observed counter-intuitive motion in RTL text. (In bidi situations where the visual direction flip-flops within the document, you have to choose one direction or the other, so you'll get the counter-intuitive motion for text in one direction or the other, and that's fine. But we shouldn't mess this up for single-language markup with a known direction.) |
This issue has been transferred to the Open UI CG's issue tracker as openui/open-ui#522 |
The Focusgroup explainer currently states:
I’m wondering if different locales change cultural expectations for what is "forward" and what is "backwards". I’d expect that in Arabic or Hebrew, "forward" is left (not right).
My understanding is that CSS has 2 properties influencing text direction:
direction: ltr | rtl
writing-mode: horizontal-tb | vertical-rl | vertical-lr
And they combine, giving 6 possible configurations that influence where "next" content appears.
If it's deemed impractical to follow
writing-mode
or even CSS layout modes that impact content flow direction (flex-direction, grid stuff…), should this proposal at least make room for ltr/rtl text direction?The text was updated successfully, but these errors were encountered: