-
Notifications
You must be signed in to change notification settings - Fork 831
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
[EuiDataGrid] cell focus is broken when only one focusable child #2626
Comments
This is a blocker for Discover's DataGrid reimplementation (elastic/kibana#51531) |
DiscussionWhat is the best way to handle this? I think the main complication here is how to keep a predictable UX while some cells expand while others do not. In a grid without cell expansion, the rules would be simple: when there is one interactive element then focus on it, for two or more keep cell-level focus until enter or f2 is pressed to toggle into a focus trap wrapping the elements. What I'm thinking is treat the expansion button as an interactive item within the cell (because it is), and:
The tricky situation is the remaining:
I have some thoughts, but want to make sure we reach an agreement on the rest before diving in. |
I agree on your list. 👍 |
That was 19 days ago? :eek: In the latter case, 2+ focusable elements (expansion button and 1+ custom elements), I feel we're stuck with a decision between some variant of
I think there's a weird interaction lingering with enter+expansion here. For non-expandable cells, we'd be treating enter and f2 separately. Maybe this needs a step back? Open to any & all thoughts here. |
I'm actually ok with either interaction I think... I think a strict adherence to the spec would push us towards the first option. This option is nice because it seems consistent across the board. It's less cases to keep track of both for users and in our code. Though, I can see an argument being made that the second option is actually the better UX because it seems like our "recommended" interaction pattern with interactive content within a cell is to interact with it within the popover which is what this option pushes you to. And I think all the content is still accessible for screen reader (sighted or not) and keyboard-only users.
|
When 2 items are in there I would just focus the cell (which is the expansion) and not the inner elements. They can always open the popover and interact with the content there with a keyboard. Mouseclickers are fine either way. The reasoning is that truncation means it is not always apparent there are multiple items in there. It's also really simple and covers our needs. |
Same answer for both of these -I think there's concern if popover doesn't include the actions, for some reason. In that case the only way to interact with the items is with a mouse, and I wouldn't expect devs to always remember that is the case (what I meant by "as no one will test for it"). I'll put a PR together to explore these options. |
Just so this doesn't go down a rabbit hole, I'll mention that last concern can be mostly solved by good docs and guidelines. |
When there is only one focusable child in a cell, focus should move directly to that element.
This is especially bad because there's no way to focus onto that element to it if that column's details popover is also disabled.
The text was updated successfully, but these errors were encountered: