aboutsummaryrefslogtreecommitdiff
path: root/test/command/4677.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-07-01 14:44:42 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-07-01 14:54:52 +0200
commitb894de64264fe0386b5cb3e1680955a8e879c78e (patch)
tree49082151eed1efbe2b72756283335d6fc0a04310 /test/command/4677.md
parentccf9889c2c5839166be4296944c45447474f2a33 (diff)
downloadpandoc-b894de64264fe0386b5cb3e1680955a8e879c78e.tar.gz
HTML writer: improve alt-text/caption handling for HTML5
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
Diffstat (limited to 'test/command/4677.md')
-rw-r--r--test/command/4677.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/command/4677.md b/test/command/4677.md
index 482db4c02..2694624b9 100644
--- a/test/command/4677.md
+++ b/test/command/4677.md
@@ -3,6 +3,6 @@
![Caption](img.png){#img:1}
^D
<figure>
-<img src="img.png" id="img:1" alt="" /><figcaption>Caption</figcaption>
+<img src="img.png" id="img:1" alt="Caption" /><figcaption aria-hidden="true">Caption</figcaption>
</figure>
```