-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Incorrect accessibility markup for A.M. tables
Based on These table examples
All examples uses the ARIA grid markup
role="grid"on the containerrole="gridcell"on regular table cells
This is misleading at best and can cause major screen reader user issues at worst.
The grid role is meant for a two-dimentional layout of interactive elements, such as a spreadsheet or a datepicker.
It is not intended for use with static/normal tables, including sortable static tables (where clicking the column headers can sort by that column), not even for tables with one or two action buttons per row (e.g. "delete" or "more info").
To fix, do one of 2 things:
Remove the ARIA markup
(all instnaces of the role attribute).
The underlying HTML markup is correct table markup.
Replace grid roles with static table roles
- Replace
role="grid"withrole="table" - Replace every instance of
role="gridcell"withrole="cell"
This would be sufficient. Other role attributes (columnheader, rowheader, row and rowgroup) are equally valid in a table and grid structure.