diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2020-07-01 14:44:42 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2020-07-01 14:54:52 +0200 |
commit | b894de64264fe0386b5cb3e1680955a8e879c78e (patch) | |
tree | 49082151eed1efbe2b72756283335d6fc0a04310 /test/writer.html5 | |
parent | ccf9889c2c5839166be4296944c45447474f2a33 (diff) | |
download | pandoc-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/writer.html5')
-rw-r--r-- | test/writer.html5 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/writer.html5 b/test/writer.html5 index 321b65afd..0f0db799e 100644 --- a/test/writer.html5 +++ b/test/writer.html5 @@ -523,7 +523,7 @@ Blah <h1 id="images">Images</h1> <p>From “Voyage dans la Lune” by Georges Melies (1902):</p> <figure> -<img src="lalune.jpg" title="Voyage dans la Lune" alt="" /><figcaption>lalune</figcaption> +<img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune" /><figcaption aria-hidden="true">lalune</figcaption> </figure> <p>Here is a movie <img src="movie.jpg" alt="movie" /> icon.</p> <hr /> |