-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Image alt tag and figcaption should be differentiated #4737
Comments
I don't think changing the meaning/syntax of the input markdown is likely to happen. This would be a big break in backwards compatibility. Having the title text or a caption attribute become the target caption seems more likely. |
Fair enough! I am not a programmer so I only have a user’s perspective. I’ll accept whatever syntax is necessary to differentiate between caption and alt. |
Should this be closed in favour of #3177 ? |
@mb21 I don't think so, I think you'd have to say more as how it would fit...? |
It’s just that the current figure handling is somewhat of a hack and a proper figure element int the AST, i.e. #3177, would handle caption and alt separately. |
I just added it to be sure, but my understanding is that creating an explicit figure object in AST implies that the caption would be separate from the alt text. |
I think this bug should be left open. The syntax shouldn't be changed, but the documentation should deprecate the usage. Alt text and caption text should never be the same. This never makes sense. It means that blind readers hear the same sentence repeated twice. It means that blind readers hear the same sentence repeated twice. The documentation should explain that. |
I recognize that this isn't ideal. But the reason
this was closed is that there's no way to
differentiate these things without an explicit Figure
element. The issue for adding that is still open;
that's the way forward to improve this.
|
What I'm saying is that there are two separate problems
That feature is a bug. It can't be removed, I know, but it can and should be deprecated. The documentation should explain why it was a mistake, and pandoc should output a warning when it is used. Even after 3177 is closed and support is added for the separate figure element, the misfeature will need to be deprecated. (And there is no reason to wait IMO.) |
Pandoc's currently simply generates the caption from the alt text and there is no place in pandoc's internal document representation to store the caption separately. So we cannot fix 2) without fixing 1) first. However, we could change pandoc's HTML writer to only output a caption, and an empty
|
Mauro Bieg <notifications@github.com> writes:
However, we could change pandoc's HTML writer to only output a caption, and no alt text if a caption is output. That way, screen readers wouldn't read it twice.
Yes, this is definitely feasible. I don't know much
about how screen readers work; but if they always read
the caption, maybe this is a good idea.
Thoughts?
|
This would certainly be an improvement on current behavior. However, I still stress that with the current explosion of open educational resources in higher ed and the absolute necessity of accessibility, my personal belief is that it should be a top priority for Pandoc to be able to output separate |
The same text is already in the <figcaption> and screen-readers would read it twice, see jgm#4737
The same text is already in the <figcaption> and screen-readers would read it twice, see #4737
As discussed in this thread on the discussion group, the behavior of captioning images is less than ideal for maintaining accessibility.
Currently, the bracketed text becomes both the alt tag and the figcaption:
When wanting to create accessible documents, it is very often necessary to provide an alt tag that describes the image itself with a caption that provides extra explanatory content. Having them be the same doesn't align with their intended use.
Adding an additional descriptor creates a title tag, which is unhelpful in this instance:
I propose amending the behavior so that the additional descriptor becomes the alt text and the bracketed text becomes the figure caption, with some other method used to derive the image title.
The additional benefit is that this would no longer require the unofficial method of escaping a space to suppress a caption and have it persist as solely an alt tag. Instead, you would simply:
The text was updated successfully, but these errors were encountered: