Re: text content of table cell for screenreader

On 19/07/2021 14:59, bryan rasmussen wrote:
> Hi,
> 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.

My personal preference, all other things being equal, would be to put an 
aria-label on the icon - and, if necessary, a role="img", depending on 
how these icons are coded. For instance, if they're inline <svg> icons:

<svg ... role="img" aria-label="Supported"> ... </svg>

A visually-hidden <span> would work just as well. Don't think there's 
any practicaly difference in how readers will perceive this (well, 
discounting the fact that they'll hear "graphic" or similar also being 
announced for the aria-label/role="img" scenario)

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Monday, 19 July 2021 14:21:56 UTC