By default, use the caption as the alt for images in HTML #8223
yuxi-liu-wired
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
@jooyoungseo do you some thoughts about this proposal ? Are caption usually good choice for default alt text ? I remember this was a good change in knitr at the time, right ? Thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
It is necessary to have alts for images. When an image has a caption, such as in

, the caption should be the default alt. For example, the following generated HTML has afigcaption
but noalt
:Why?
Images must have alternate text | Axe Rules | Deque University | Deque Systems
It is good for accessibility and SEO.
Also, if the caption does not play well as an alt text, then it is probably not a good caption and needs to be rewritten for clarity.
Beta Was this translation helpful? Give feedback.
All reactions