WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Table with hidden first column

for

From: R.U. Steinberg
Date: Nov 7, 2018 10:32AM


This was my workaround. We have a table where the first row is the header
row and will be announced as row 1 to screen readers. When you get to the
second row, it has a number 1 in front of it but will be announced as row
2. This is a confusing user experience when you have a table with say 100
rows. A screen reader user shouldn't have to guess what row they are on.

https://codepen.io/rusteinberg/pen/WYrogg


On Mon, Oct 29, 2018 at 11:29 AM R.U. Steinberg < <EMAIL REMOVED> >
wrote:

> Aria-hidden is still counting the column although not announcing content
> for NVDA and VoiceOver.
>
> Another reason for doing this is the header row will always be counted as
> row 1.
>
> So if I am on a row marked 148, visually I am on that row but screenreader
> will say I'm on row 149. The visual row number will always be off by one
> row with screenreader.
>
>
> On Mon, Oct 29, 2018 at 11:03 AM glen walker < <EMAIL REMOVED> >
> wrote:
>
>> An alternate solution is to *not* have a hidden column but rather
>> aria-hidden text that you put in the first real column. So you'd have
>> something like
>>
>> <td><span aria-hidden="true">1</span> fred</td>
>>
>> You could visually style the number any way you want and it would appear
>> next to the employee name but not be read by a screen reader.
>>
>> I agree with Jared (and probably most people on this list) that, in
>> general, any info that is good for visual users is also good for AT users
>> and you don't want to hide it. But tables are kind of special since AT
>> can
>> read the row and column you are on without having a visual clue. By
>> adding
>> the visual clue, you then get repeated info for AT.
>>
>> I typically turn off the row/column numbers read by AT because I just want
>> to hear the row/column headers.
>>
>> Glen
>> >> >> >> >>
>