Eui: [EuiDataGrid] a11y roles not valid (gridcell without row)

Created on 2 Feb 2021  路  3Comments  路  Source: elastic/eui

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

accessibility bug data grid

All 3 comments

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

Datagrid pages are disabled in the axe check

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.

Was this page helpful?
0 / 5 - 0 ratings