Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Allow using title attribute for figcaptions in implicit figures #6859

Closed
melissaboiko opened this issue Nov 19, 2020 · 2 comments

Comments

@melissaboiko
Copy link

Currently, when building an HTML <figure> from the implicit figure Markdown extension, pandoc will duplicate the alt attribute as the <figcaption>. I think that, if both attributes are provided, title should be preferred for the <figcaption>.

Recall that the alt attribute is intended for when images can’t be displayed, as in screenreaders, textmode browsers, or broken links. In modern browsers, the the alt content is never given alongside the images; either one or the other will be presented.

The title attribute, by contrast, is intended for supplementary information. In practice it’s normally displayed as a hover tooltip. People use it for things like attribution, comments about the image (clarifications and notes for somebody who can see the image; not a full description that would replace it), little jokes.

So if we are going to display the image and one of the attributes at the same time, it looks like title makes more sense.

Figure captions in academic usage typically will be brief names for the image, like "Figure 1: Average and variance of prototypes." They don’t replace the information of the image (listing, for example, all of the numbers presented in a graph), but rather label it, supplementarily. So they’re more title-y than alt-y. Moreover, many authors include additional, title-y supplementary information in the caption ("Figure 1: Averages. Note the outliers from southern areas.") (cp. Latex short/long caption function.)

Figure captions in common web usage, when they exist, are often used pretty much the same as tooltip titles: attributions, observations, jokes etc.


To support screenreaders and enable accessibility, one should provide full information about the image in the alt, which could stand for it when it can’t be displayed. It’s often the case that the more details the better, resulting in long descriptions. In the current system, these descriptions will then become excessively long captions. Furthermore, these captions will be, by definition, strictly redundant.

@mb21
Copy link
Collaborator

mb21 commented Nov 19, 2020

Have you seen #3177 ?

@jgm
Copy link
Owner

jgm commented Nov 19, 2020

I think this has been discussed quite a bit elsewhere.
To summarize, we can't use title because we need something that supports formatting, and title (in pandoc's AST) is just a plain string. That's why we use alt. But we agree it's not completely satisfactory; #3177 is the way forward.

@jgm jgm closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants