Skip to content
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

Existing Issue: Datagrid checkboxes should not capture tab focus #87

Open
steve-haar opened this issue Aug 10, 2022 · 5 comments
Open
Labels
priority: 0 must fix before shipping source: a11y

Comments

@steve-haar
Copy link
Contributor

Tab should not jump to the next datagrid checkbox, instead it should jump out of the grid

From Amy Li

when you use a datagrid you only use arrow keys to navigate between cells and tab key to enter or leave the entire datagrid getting to the checkbox cell should just be arrow keys

if you play with any of these w3 examples you can see that behavior https://www.w3.org/WAI/ARIA/apg/example-index/grid/dataGrids

@kevinbuhmann
Copy link
Member

We allow keyboard users to resize columns by tabbing to the column separator and using the arrow keys. If tab jumps out of the grid, that won't work anymore.

@kevinbuhmann
Copy link
Member

kevinbuhmann commented Aug 11, 2022

Fun related issue:

  1. Tab to a checkbox.
  2. Press the down arrow a few times.
  3. Press tab.
  4. Observe that the focus moves up to the checkbox below the one originally tabbed to.

@Jinnie
Copy link

Jinnie commented Aug 15, 2022

I have to disagree. The checkbox is a standard control, it's not datagrid custom control. We can't take it out of tab order easily. We do transfer focus to it when using arrow keys, but taking it out of the tab sequence does not seem right to me.
Even if we hack it for the checkboxes that we generate (the ones for selection) we won't be able to force it on any user-provided cells that may also contain checkboxes.

Also, the provided examples link (https://www.w3.org/WAI/ARIA/apg/example-index/grid/dataGrids) does not contain data grids with checkboxes

About Kevin's comment, yes this is a minor bug we may consider fixing. The key-nav service does not reinitialize its index on manual focus of an in-content input.

@kevinbuhmann
Copy link
Member

I think Amy is correct here. The tab key should not force keyboard users to tab through each row in the grid to get out of it.

The W3 guidelines support this bug report as well.

Only one of the focusable elements contained by the grid is included in the page tab sequence.

https://www.w3.org/WAI/ARIA/apg/patterns/grid/

@Jinnie
Copy link

Jinnie commented Aug 16, 2022

In ideal world, I agree this is best. But should we only do it for our own generated controls, or for user content too?
Our users tend to put quite complex thing into grid cells, especially in expandable rows - they sometimes have whole child data grids inside. If we start stealing focus from them, we'll find ourselves in a big pool of bugs.

@AmyLiNow AmyLiNow added the priority: 0 must fix before shipping label Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: 0 must fix before shipping source: a11y
Projects
None yet
Development

No branches or pull requests

4 participants