Eui: [Data Grid] Cell focus is too aggressive

Created on 8 Aug 2019  路  7Comments  路  Source: elastic/eui

The cell focus in use in EuiDataGrid is a little too eager at the moment. We likely need the following usage changes.

  1. No focus should exist until the user clicks or tabs into the cells.
  2. Any outside action (including clicks or tabs on the menu systems, column sizing or pagination) should remove focus completely from the grid.
  3. If someone tabs back into the grid after the above, regardless of where the position previously was, it should reset back to [0,0]
  4. Changing the content or display of the grid should not focus it.
accessibility bug data grid

All 7 comments

How set are you on #3? The rest I agree are buggy things in my implementation but that was intentional.

It's not spelled out in the spec so I don't think we strictly have to keep it that way but every example did keep with that so, so did I. I think the workflow that it enables is: I'm doing something in the grid, I realize I need to change a setting or something, and then I want to come back to what I'm doing. If focus resets in that case, I have to navigate back to the cell where I was working instead of being able to pick up with where I was.

I'm sure there's some other workflow that's negatively impacted because there always is but nothing concrete comes to mind.

This was fixed in our feature branch. Thanks @myasonik

This seems to have resurfaced in the version we have merged into EUI so I'm reopening the issue.

To me, three doesn鈥檛 seem like a problem, perhaps if necessary clearSelectionOnBlur could be an additional property. I like the behavior of preserving focus on the cell I was working in.

I think this ticket has become a little broad and confusing.

What I was talking about resurfacing is on page load, the grid steals focus immediately. (Focus should be on first focusable element of the page almost always.)

Everything else (including number 3 in the description) works as expected right now, I believe.

@myasonik can you test again when you get a chance? I'm not reproducing the auto-focus issue.

Can't reproduce it anymore! Closing this ticket!

Was this page helpful?
0 / 5 - 0 ratings