-
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: Add grid
keyboard navigation
#68225
base: trunk
Are you sure you want to change the base?
Conversation
@@ -65,7 +65,7 @@ export function useHasAPossibleBulkAction< Item >( | |||
item: Item | |||
) { | |||
return useMemo( () => { | |||
return actions.some( ( action ) => { | |||
return actions?.some( ( action ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related to this PR.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
f54b260
to
4453d8e
Compare
Size Change: +92 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
Flaky tests detected in ce8f5db. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12480784310
|
4453d8e
to
ce8f5db
Compare
Hey, tested this one and this is what I see. The tab stops are irregular: sometimes you stop at the item wrapper, and sometimes you don't. Additionally, I don't think we should have a stop at the item wrapper if it isn't interactive. Screen.Recording.2024-12-24.at.14.22.05.movAs for arrow key navigation, my understanding is that that arrow keys are bounded and should only move you through the direction (horizontal or vertical). Examples:
Screen.Recording.2024-12-24.at.14.28.44.mov |
Can you add some more steps to reproduce this? The composite item is always the wrapper and you should have the first grid item as an 'active' one, by pressing tab, while the focus was on Are you referring as
These are just two flags in our Composite component (focusLoop and focusWrap) and we can remove them if we want. I don't think it's agains some a11y patterns though. |
Try just navigating with tabs, one direction and then another. What I mean by irregular is that the number of stops is not consistent, it changes depending on direction, for example:
(also, for clarity: I don't think we should stop at any wrapper that is not interactive) Screen.Recording.2024-12-26.at.12.01.50.mov |
What?
Resolves: #59188
This PR aims to add proper keyboard navigation in
grid
layout for DataViews.Tasks
outline
and how it plays with thepreview field
outline or when there is a selected item (also has outline).Testing Instructions
preview size
(from view options) or not. This is important as the default styles are always applied throughJS
now. This is needed because we have to split programmaticallyrows
.tab
.Screenshots or screencast
Screen.Recording.2024-12-22.at.12.30.37.PM.mov