-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Discovery: research keyboard handling for grid components #11851
Comments
There's a curious thing in how we handle grids as some of them have not predefined columns. For example, list styles have responsive grid, based only on CSS. However font colors do have predefined columns count. |
As far as the implementation goes we might consider doing it as a helper rather than making this feature a UI component class. An example of such composition-based approach is click outside handler:
|
For the record, it looks like the table insertion grid should handle keyboard differently because when reaching the right boundary of the grid, the right arrow key should not move focus back to the first column (which would be expected in the color grid). |
Yet another approach could be using a FocusCycler as it's already partly used in grid-based features. We'd have to enhance it for grids so e.g. the next/previous methods would 'know' that at some point a row of elements ends and we have to go to the beginning/end of the row instead of to the next/previous element. And of course we'd have to add vertical navigation as well for handling arrow up/down events. We'd have to discuss if there should be one FocusCycler for everything or two FocusCyclers at the same time - one for main navigation and the second one for grid only. |
BTW: #5772 |
Navigation (tab vs arrow keys):There should be two different navigation handled (they shouldn’t be mixed together):
In case we decided using 2 focusCyclers, they will have to operate on two different levels - we cannot mix the levels in one focusCycler, e.g. cycling through sections of the view with tab key should be in a different focusCycler than moving between grid items with arrow keys. The approaches discussed regarding focusCycler:
3 possible solutions (for this ticket):Actually we came to the conclusion that there are 3 ways of handling this issue:
We agreed that the best option would be 2 (helper + GridView class). Notes about the implementation of the GridView class:
Summary:
Decided:
|
A follow-up issue for keyboard navigation in color picker in table properties: #12193 |
This comment was marked as outdated.
This comment was marked as outdated.
…r-grid-components-discovery-poc Feature (ui): Introduced the `addKeyboardHandlingForGrid()` helper to handle grid keyboard navigation. Closes #11851. Fix (font): Fixed focus order for color grid in font color and background drop-downs. Closes #11841. Fix (list): Unified focus handling and keyboard navigation in list properties drop-downs. Closes #11041.
Provide a description of the task
Research best practices on how to handle grid navigation using the keyboard.
We have multiple grid-like UI components:
To make it clear: this issue is just discovery. It's meant just to figure out best way to implement it and see why we have it implemented the way we did. We also can make some PoC to see how much effort will it require to fix it.
Once we have figured how this should be solved, we can move on to each separate issue.
The text was updated successfully, but these errors were encountered: