Image caption isn't associated to the image in an accessible way #2478
Ovgodd
started this conversation in
Ideas & Enhancements
Replies: 1 comment
-
|
I will propose a solution |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
When adding a caption to an image in BlockNote, the caption currently fails to meet WCAG criterion
The issue is that the caption is not semantically associated with its image.
Expected behavior
The
<figure>element should wrap both the<img>and its caption (<figcaption>), ensuring a proper semantic relationship.Describe the solution you'd like
<figure>and<figcaption>for images with captions.alttext for the image.<figcaption>as visible content.alt="".role="presentation"andaria-hidden="true".Describe alternatives you've considered
<p>caption: rejected, as it does not satisfy WCAG requirements.aria-describedby: possible fallback, but less semantic than the<figure>/<figcaption>solution.Additional context
Actual structure :
Example of expected structure:
Beta Was this translation helpful? Give feedback.
All reactions