You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of YFM allows users to add images with alt-text and title props. To enhance image context and readability, i propose utilizing the figcaption HTML tag for rendering captions.
To enable the display of the caption you need to add the { caption } as attribute, the default value is equal to the title, but it can also be passed in the attribute
Is it possible to use global setting for using Alt text as Caption?
Backward compatibility is understood - so, new setting is needed.
Caption under Image is expected behavior actually. It's most common use, GitBook generates captions this way also.
KISS principle without additional attributes.
Is it possible to use global setting for using Alt text as Caption?
Аlt text has a different meaning and should be used to describe the image. Using alt text to caption images would negatively impact user experience of the documentation from an accessibility perspective.
It's common practice among popular platforms like gitbook and pandoc.
You may have another implementation, but I told about compatibility, minimalistic approach and global optional setting which changes default behavior and uses Alt as Caption.
Description
The current version of YFM allows users to add images with
alt-text
andtitle
props. To enhance image context and readability, i propose utilizing thefigcaption
HTML tag for rendering captions.To enable the display of the caption you need to add the
{ caption }
as attribute, the default value is equal to the title, but it can also be passed in the attributeExample Syntax
In this example, the "Caption text" should be rendered within a figcaption tag below the image.
Example HTML Output
The resulting HTML should look like this:
DOCSTOOLS-3428
The text was updated successfully, but these errors were encountered: