WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: table cells, th-mapping

for

From: glen walker
Date: Mar 16, 2021 9:21AM


In theory, yes, but I couldn't get headers to work with NVDA or JAWS. Both
always read the entire header instead of what was in the headers attribute.

I had

<th><span id="foo">first</span>second</th>

then

<td headers="foo">1</td>

NVDA and JAWS (both chrome and firefox) would always say "first second"
when I navigated to the cell using the screen reader table navigation keys
(ctrl+alt+arrow). I only expected to hear "first".

I would *not* recommend setting aria-hidden on "second" because, even
though that would hide the text from the header, it would also make the
text absolutely hidden from the screen reader. If you have text that is
visible, it should be available to all users. Using the headers attribute
should have hidden the extra text from the header but still allowed the
screen reader to navigate to the header cell and read all the text.