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

[EuiDataGrid] a11y roles not valid (gridcell without row) #4474

Closed
flash1293 opened this issue Feb 2, 2021 · 5 comments · Fixed by #5285
Closed

[EuiDataGrid] a11y roles not valid (gridcell without row) #4474

flash1293 opened this issue Feb 2, 2021 · 5 comments · Fixed by #5285

Comments

@flash1293
Copy link
Contributor

Due to virtualization, there are no "row" elements in the data grid anymore.

As the individual cells have a gridcell role, this is causing automated a11y tests to fail: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Gridcell_role

I'm not sure about the right solution:

  • should we simply remove the gridcell role?
  • should we wrap all of the cells in a single row element (even though it's not 100% correct)?
  • Is it possible to introduce dummy elements for rows in the dom tree (AFAIK our virtualization lib doesn't allow this)

cc @myasonik @chandlerprall

@flash1293 flash1293 added the bug label Feb 2, 2021
@chandlerprall chandlerprall changed the title DataGrid: a11y roles not valid (gridcell without row) [EuiDataGrid] a11y roles not valid (gridcell without row) Feb 2, 2021
@myasonik
Copy link
Contributor

myasonik commented Feb 2, 2021

@chandlerprall how does EUI's automated testing not fail on the same thing?

@chandlerprall
Copy link
Contributor

Datagrid pages are disabled in the axe check

@myasonik
Copy link
Contributor

myasonik commented Feb 2, 2021

For EUI, I can't think of a workaround for getting around this requirement. A role=grid needs children with role=row.

For Kibana, at this point, the most practical solution is probably to ignore datagrid classes in the tests. @flash1293 I can help you set that up.

@j-m
Copy link
Contributor

j-m commented May 27, 2021

Looks like react-window is unlikely to fix this (bvaughn/react-window#217)

@myasonik
Copy link
Contributor

Did some exploration on this:

  • Need to convert react-window's use of Grid back to List (so that it can be a vertical List of rows, and each row would then have a horizontal List of cells) which breaks a few APIs which is annoying. You can get kind of close feeling pretty quickly but getting the last 10% working takes just as long.
  • Would be a bigger effort but the API of react-virtual is actually loads better than react-window... And it supports variable and dynamic heights out of the box...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants