-
-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
Problem
Currently, in Post.tsx lines 219-223, <figcaption> is being used as the alternative text for images.
Lines 219 to 223 in 7f69716
| medium.description && medium.description.trim() !== "" ? ( | |
| <figure> | |
| <Medium medium={medium} /> | |
| <figcaption>{medium.description}</figcaption> | |
| </figure> |
However, <figcaption> should be used as a caption (description) for the image, not as alternative text. Alternative text is used to convey the content of the image to users who cannot visually perceive it. On the other hand, a caption is meant to supplementarily explain the content of the image.
In this state, screen reader users might have both the image's alt text and <figcaption> element read aloud twice, redundantly.
Example Case
Suggestion
Images using only <Medium medium={medium} />, without using <figure> and <figcaption> elements.
{post.media.length > 0 && (
<div>
{
post.media.map((medium) => (
<Medium medium="{medium}" />
))
}
</div>
)}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
