-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Tabs: Keyboard navigation and indicator issues in RTL languages #64963
Comments
I think we should file the keyboard issue in the Ariakit repo, cc @diegohaz for visibility too. |
All indicator issues are fixed in #64926. |
The |
I found that this problem occurs not only in the |
ToggleGroupControl bug fix in #65735 |
|
Closing this issue as all flagged components have been improved |
Description
I think there are two problems with the
Tabs
component in RTL languages.⚒️ Keyboard Navigation
Note: This problem occurs not only in the Tab component, but also in the following two components:
ToggleGroupControl
: ToggleGroupControl: Fix arrow key navigation in RTL #65735RadioGroup
(deprecated): RadioGroup: Fix arrow key navigation in RTL #66202When I press the left or right key, I expect the focus to move to the tab in that direction. However, in RTL languages, the direction of the key and the direction in which the focus actually moves are opposite:
22a2f1bd4be87fd6cdd8189c7723e39a.mp4
From what I understand, this component is based on
@ariakit/react
.Therefore, when I tested the ariakit
Tab
component itself, the problem seemed to be reproduced in the same way. I tested it by addingdirection:rtl
to thehtml
element on the component preview page:d51cbeee08a2bed5e81e548291e62fc0.mp4
✅ Indigator position
(Fixed in #64926)
When the browser width changes, the indicator position is misaligned:
8e9e44481a7565e73ff6b7da9243761f.mp4
Probably in RTL languages, we need to calculate the right position instead of the left position:
gutenberg/packages/components/src/tabs/tablist.tsx
Line 81 in 2157b85
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: