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
"useTabList" hook keyboard navigation with arrow keys not considering orientation #5996
Comments
Could either make a new KeyboardDelegate which doesn't have getKey(direction) depending on the orientation.
Or we could add some logic to to useSelectableCollection
|
Hello, I am medhashis and I am new here. I made a solution for this issue and it is working. I am new to open source so I am unable to clearly understand what are the checkpoints to this open source repo. I have some naive questions like how to pass the test-canary, test-16, ts build fork points checks etc and it is also my first time contributing to adobe (https://opensource.adobe.com/cla.html). In the form there is something like GitHub Login, I am confused If the github login and github username are same. Can anyone please help me ?, I liked this repo and want to be an active contributor |
@majornista just wanna check if you have an opinion here on this behavior. I think previously we had changed this behavior since we couldn't rely on the screenreader from announcing the orientation of the Tabs hence the fallback to having both pairs of arrow keys move focus through the Tabs regardless of orientation? |
Provide a general summary of the issue here
We are using the
useTabList
hook to build a tab component that only uses thehorizontal
orientation. By the definition of W3 regarding keyboard navigation for tabs, thehorizontal
orientation should only be navigated by usingLeft Arrow
&Right Arrow
keys while usingDown Arrow
&Up Arrow
should scroll the page.We have currently implemented a workaround by overriding the
onKeyDown
with a custom callback that is blocking theDown Arrow
&Up Arrow
key navigation.🤔 Expected Behavior?
When using
orientation="horizontal"
foruseTabList
from'@react-aria/tabs'
users should only be able to switch the tabs withLeft Arrow
&Right Arrow
keys.Down Arrow
&Up Arrow
keys should scroll the page.😯 Current Behavior
When using
orientation="horizontal"
foruseTabList
from'@react-aria/tabs'
users will switch the tab by either usingLeft Arrow
&Right Arrow
orDown Arrow
&Up Arrow
keys.💁 Possible Solution
We are currently using a workaround to override the returned event handler
onKeyDown
with our own custom solution:🔦 Context
https://www.w3.org/WAI/ARIA/apg/patterns/tabs/#keyboardinteraction
🖥️ Steps to Reproduce
react-spectrum
tabs component)Tab
key)Version
"@react-aria/tabs": "^3.8.5"
is currently used but the version does not matter.What browsers are you seeing the problem on?
Other
If other, please specify.
Browser is not relevant, issue happens everywhere.
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: