b894de6426
Screen readers read an image's `alt` attribute and the figure caption, both of which come from the same source in pandoc. The figure caption is hidden from screen readers with the `aria-hidden` attribute. This improves accessibility. For HTML4, where `aria-hidden` is not allowed, pandoc still uses an empty `alt` attribute to avoid duplicate contents. Closes: #6491
259 B
259 B
% pandoc -f markdown -t markdown_strict
![My caption](./my-figure.jpg){width=500px}
## Header 2
^D
<figure>
<img src="./my-figure.jpg" width="500" alt="My caption" /><figcaption aria-hidden="true">My caption</figcaption>
</figure>
Header 2
--------