-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGrid] turn-off tabindex, remove from the tab sequence #2113
Comments
@EdmundsEcho Great point. I think that we miss a prop to disable cell selection. Here is why:
https://www.w3.org/TR/wai-aria-practices-1.1/#table What would be your expected behavior on the headers? Related to #1442. |
...glad to see the supporting text for the use case. This said, clearly the data-grid will be used for both "view" and "edit" modes. When in the "view" mode, I would not expect to have any of the elements in the grid-component being part of the tab-sequence... other than the paging buttons if they exist. This means, as a user, if I want to "work with the view", i.e., filter and sorting, I would expect to have to use my mouse to select what I want to do. Given the following groups of sequences:
IMO the following tabindex enum might be useful prop choice:
Part of my thinking: If someone is editing the data, likely the amount of data is less compared to other scenarios. This means, less demand for filtering when editing. If paging exists, it's part of navigation, and thus a higher priority. I hope this helps. PS: I had what I thought was a good idea for the Mui platform in general. I posted the suggestion, but it seems to have stalled. In a nutshell, the theme |
We don't plan to add a prop to remove the grid from the tab sequence. This is the opposite of what the accessibility guidelines recommend. Instead, you can listen for Tab events that occur in an element before the grid, then focus another element after the grid. This will prevent the focus going to the grid. You can check the following example: https://codesandbox.io/s/datagriddemo-demo-mui-x-forked-98fx3j?file=/demo.tsx:2129-2144 |
Reading through the issues on the topic of tabindex, it looks like you all have come up with some useful default behavior.
However, I could not figure out if/where there was a way to set the tabindex to "-1" so that the data-grid is ignored when hitting tab. I use the grid in context of several other form elements. I use it to mostly "view" the data, less so to edit the data... thus the motivation to remove the grid from the "data-entry" sequence per se.
Thanks for either letting me know how to do so now, or otherwise as a potential feature.
Order id 💳
The text was updated successfully, but these errors were encountered: