WebAIM - Web Accessibility In Mind

E-mail List Archives

Images with captions - technical realization?

for

From: wolfgang.berndorfer
Date: Jan 3, 2020 2:42PM


Hi,

The more I read, the more I doubt about this simple issue.

How should images with visual captions be technically realized for SR?



A) <figure> with <figcaption>

. seems to be the native semantic.



But my screen reader does, what it should: It repeats the value of the
figcaption three times: When entering and leaving the figure-section and
when entering the figcaption-element.

These redundancies disturb SR UX, although such examples are even presented
in the spec:

https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-elem
ent



1. How to avoid these redundancies technically or with SR settings?

2. Should <figure> only be used, when a *long description* in the
<figcaption> is reasonable?



B) <img> followed by <p> with captioning text



3. Could a simple <img> - <p> combination be semantically connected?
aria-describedby only works within focusable elements.



Furthermore: Redundancies with the value of the alt-attribute



4. What if the value of the <figcaption> or <p> matches the alt-attribute in
the image already? If alt=NULL, the SR won't announce the *existence* of an
image at all, which might be useful and necessary sometimes.



Thanks for ideas!



Wolfgang