openui / open-ui

Maintain an open standard for UI and promote its adherence and adoption.
https://open-ui.org
Other
3.59k stars 191 forks source link

[switch]: Does the "on" position change between rtl and ltr? #1098

Open gfellerph opened 2 months ago

gfellerph commented 2 months ago

This question comes up in the globalization section of the switch explainer.

In a ltr environment, the "on" position of the switch is usually on the right side of the switch. Is it the same for a rtl environment or should the "on" position be on the left side of the switch?

aphillips commented 1 month ago

It should switch sides. Multi-label switches should also change their order.

matial commented 1 month ago

@aphillips As a bidi user, I concur. This is also what happens mostly in practice (based on personal impression, not on extensive research).

brechtDR commented 1 month ago

I only have some experience with RTL work for clients, and I did notice we switch sides. So would be lovely as an author not needing to think about this đź‘Ť

css-meeting-bot commented 1 month ago

The Open UI Community Group just discussed [switch]: Does the "on" position change between rtl and ltr?, and agreed to the following:

The full IRC log of that discussion <hdv> gregwhitworth: Philipp has done a great job moving switch forward
<hdv> gregwhitworth: this specific issue is that, we have on/off states on things like physical light switches… this issue is about whether on off state changes based on writing mode
<hdv> gregwhitworth: I added the `i18n` tracker and they weighted in
<keithamus> q+ naman
<keithamus> ack naman
<gregwhitworth> ack naman
<hdv> nmn: to agree and give some evidence, I looked it up in @@@ , they both flip the position of switches based on language
<hdv> nmn: in my experience, users have expectations based on what they are used in… eg before, scrollbars would sometimes go to the other side based on language, but it is not 100% consistent. But in case of switches, looks like they are
<masonf> +1
<keithamus> s/@@@/iOS and Android docs/
<hdv> gregwhitworth: one thing I heard from webkit folks is that great part of what's in switch also applies to other elemenets like range
<hdv> s/elemenets/elements
<hdv> nmn: I looked up some YouTube videos of Android and iOS in Arabic to see what happens, looks like both switches and slides switch to the right
<masonf> q+
<hdv> nmn: it looks like everything flips other than scrollbars
<gregwhitworth> ack masonf
<hdv> masonf: we're talking about horizontal modes, but when someone on my team worked on vertical writing modes… there was a real debate whether more means down or up in vertical writing mode
<hdv> masonf: could depend on culture even
<hdv> gregwhitworth: a light switch should be on or off though… 
<hdv> gregwhitworth: it's important to us that we work on this holistically
<hdv> gregwhitworth: is why it's great think about looking at vertical… though maybe needs to be a separate issue
<hdv> masonf: agree should be a separate issue
<hdv> gregwhitworth: could you open a new issue for vertical, gfeller?
<gregwhitworth> Proposed Resolution: RTL and LTR should be supported that the thumb adjusts position. Open a new issue to discuss vertical writing modes
<hdv> nmn: just wanted to mention, what is 'on' is geographical, 'on' is up in the US but usually down in India. We should probably look at some languages and see what they do
<masonf> +1
<gregwhitworth> RESOLVED: RTL and LTR should be supported that the thumb adjusts position. Open a new issue to discuss vertical writing modes
<gregwhitworth> Zakim, end meeting