RE: text content of table cell for screenreader

Bryan,

> I have a bunch of table cells that have icons in them and of course I have to add
> the text value that denotes exactly what the meaning of that icon is to the cell
> - I was wondering if anyone knows which will 'work better', should I put a
> screenreader only span inside the table cell with the text content or should I
> put an aria-label on the icon.
> Normally I would put the label but wonder if there aren't some readers where
> that will break tabular navigation.

I don't think there would be a problem with table navigation. Your icons need accessible names.

When you write about putting a label on an icon, you probably don't mean
<img aria-label="...">
(in that case use alt instead of aria-label)
You probably mean something like
<span class="css-icon-1" aria-label="...">

refer to Roles which cannot be named (Name prohibited) in ARIA 1.2. You can also read the following table:
<https://html5accessibility.com/stuff/2020/11/07/not-so-short-note-on-aria-label-usage-big-table-edition/>

To answer your question: If you can't put an alt attribute in for the icon, then use a sr-only technique for the text alternative.

Jan


--
Hellbusch Accessibility Consulting
Chemnitzer Str. 50, 44139 Dortmund
Tel.: +49 (231) 58054815 Mobil: +49 (163) 3369925
--
Accessibility-Consulting seit 2000 

Leistungen, Bücher, Artikel: https://www.barrierefreies-webdesign.de
Blog: https://www.hellbusch.de

Received on Monday, 19 July 2021 14:27:06 UTC