Skip to content
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

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

Open
gfellerph opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1105
Open

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

gfellerph opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1105
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. switch Switch control

Comments

@gfellerph
Copy link
Collaborator

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?

@gregwhitworth gregwhitworth added switch Switch control agenda+ Use this label if you'd like the topic to be added to the meeting agenda i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. labels Sep 29, 2024
@aphillips
Copy link

aphillips commented Sep 29, 2024

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

@matial
Copy link

matial commented Sep 30, 2024

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

@brechtDR
Copy link
Collaborator

brechtDR commented Oct 2, 2024

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
Copy link

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

  • RESOLVED: RTL and LTR should be supported that the thumb adjusts position. Open a new issue to discuss vertical writing modes
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

gfellerph added a commit that referenced this issue Oct 10, 2024
Issue #1098 resolved to make the switch adapt to flow direction of scripts and render the "on" state on the left side for `rtl` and on the right side for `ltr`.
@gregwhitworth gregwhitworth removed the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. switch Switch control
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants