View Single Post
Old 07-04-2025, 04:11 AM   #9
Slevin#7
Connoisseur
Slevin#7 began at the beginning.
 
Posts: 72
Karma: 10
Join Date: May 2025
Device: iPad
Quote:
Originally Posted by Quoth View Post
I'm obviously a confused idiot. If an image has alt-text I never see it, but isn't it always read by a screen reader?
You're right, the alt attribute gets perfectly read and is only shown visually as a fallback when the image can't be presented.

However, regarding to WCAG it should only be used for short descriptions, while long descriptions should be provided via aria-describedby: https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA15

The recommended maximum size of characters for the alt attribute seems to be round about 125, though theoretically there is no limit.

To go with the recommendations and assuming WCAG knows why and what I will stick with aria-describedby for long descriptions, I my case over 1000 chars. But unfortunately they don't provide a common solution how to hide the element which contains the description.
Slevin#7 is offline   Reply With Quote