Google Lighthouse, reports <th> elements and elements with [role = "columnheader" / "rowheader"] that does not address enough data cells and therefore lowers the user experience.
How to pass data cell audits?
Let’s go through the example. For example, the table below contains a table header column. But there is no table data set that this refers to. In that coding, the header column represents “Marathon pace”.
| Week | Total miles | Longest run | Marathon pace |
|---|---|---|---|
| 1 | 14 | 5 | |
| 2 | 16 | 6 |
Fixing this is possible by having a table data cell in the rest of the code. It is ‘’Marathon pace’’.
| Week | Total miles | Longest run | Marathon pace |
|---|---|---|---|
| 1 | 14 | 5 | 4:45:00 |
| 2 | 16 | 6 | 4:33:00 |