I recently read that a table can have multiple rows of < th > and pass validity. I have a narrow table and need to get < th > on multiple rows. When I test with NVDA it reads all the < th > in the column and then the data cell. Would this not be confusing to the user?
This is allowed and there are ways to structure your markup to aid accessibility.
In general, you provide unique IDs for each
<th> and then each
<td> lists which headers apply to itself. This prevents the extra headers from being read by the assistive tool.
<th id="th1" headers="blank">Header 1</th> <td headers="th1">Data 1</td> <th id="th2" headers="blank">Header 2</th> <td headers="th2">Data 2</td>
However, you should also consider if the information would be just as effective if you use two separate tables with simpler headers. (They can be unified visually with CSS if needed.)