-
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
DataViews: Keyboard navigation in filter configuration listbox is broken #67152
Comments
Thanks, @jameskoster. I was able to reproduce the issue and will be raising a PR soon for this. |
Unfortunately, this issue appears to be new to WP6.7, so it might be worth fixing in a minor release. |
I move it to 6.7.2, as we are right now closing editor tasks for 6.7.1 RC. |
I feel instead of adding custom logic for keyboard navigation, using the focusWrap prop seems to be a simpler way to enable up/down arrow navigation. However, I found that using the orientation prop to set the navigation to "vertical" doesn't seem to work. It might be worth looking into that. I also found this to be working, but it doesn't feel like the best solution and might need improvement. onKeyDown={ ( event ) => {
// Prevent left/right arrow keys, allow up/down for navigation
if (
event.key === 'ArrowLeft' ||
event.key === 'ArrowRight'
) {
event.preventDefault();
}
} }
<Composite
virtualFocus
focusLoop
focusWrap
orientation="vertical"
aria-orientation="vertical"
...
/> |
Before we add new events or props, we need to investigate why this issue occurs. From what I've researched, it seems like this issue first occurred in #65821. @WordPress/gutenberg-components Do you know anything about this issue? |
kb.mp4
When the listbox is focused, keyboard arrows up/down should navigate between options. This isn't currently the case. Curiously arrows left/right navigate instead.
To reproduce
The text was updated successfully, but these errors were encountered: