Quote:
Originally Posted by Quoth
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.