There may be an accessible solution using aria attributes like aria-label or aria-labelledby. I wonder if we should consider a visible table header. Or in the case of table cells - a visual representation of 'no data'.
It seems like there is quite a bit of debate on this topic online. It'd probably warrant a conversation with @jessiehuff and others
Another possibility is to replace empty th cells with empty td cells since they don't cause the same axe warning. Maybe even a combination of aria-labels and td cells may work...
Our automated accessibility tests are beginning to flag empty table headers - such as the
https://dequeuniversity.com/rules/axe/4.2/empty-table-header
There may be an accessible solution using aria attributes like
aria-label
oraria-labelledby
. I wonder if we should consider a visible table header. Or in the case of table cells - a visual representation of 'no data'. It seems like there is quite a bit of debate on this topic online. It'd probably warrant a conversation with @jessiehuff and othersAnother possibility is to replace empty
th
cells with emptytd
cells since they don't cause the same axe warning. Maybe even a combination ofaria-label
s andtd
cells may work...https://dequeuniversity.com/rules/axe/4.7/empty-table-header
Seems this w3 examples supports the use of
td
in lieu ofth
when necessary: https://www.w3.org/WAI/tutorials/tables/irregular/#table-with-two-tier-headers