2 ms·
They do! If you need to label an image for both screen-readers and screen you can use the aria-labelledby attribute. [1] [2] <img src="sunflowers.jpg" ari
by ratww 6y ago
They do!
If you need to label an image for both screen-readers and screen you can use the aria-labelledby attribute. [1] [2]
<img src="sunflowers.jpg" aria-labelledby="my_txt">
<span id="my_txt">Foo bar baz</span>
However some UX copywriters prefer to have extra information in the alt attribute.
[1] https://www.w3.org/WAI/GL/wiki/Using_aria-labelledby_to_provide_a_text_alternative_for_non-text_content https://www.w3.org/WAI/GL/wiki/Using_aria-labelledby_to_prov...
[2] https://fae.disability.illinois.edu/rulesets/IMAGE_1/ https://fae.disability.illinois.edu/rulesets/IMAGE_1/