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

Accessibility suggestions for figure and figure caption #6782

Closed
jooyoungseo opened this issue Oct 27, 2020 · 4 comments
Closed

Accessibility suggestions for figure and figure caption #6782

jooyoungseo opened this issue Oct 27, 2020 · 4 comments

Comments

@jooyoungseo
Copy link

jooyoungseo commented Oct 27, 2020

As a blind person who uses screen reading software, I feel Pandoc's support and its syntax for alt text and caption are subject to further discussion.

title attribute is not recommended to use for <img> because its value can be not read when alt attribute is present (depending on screen reader settings, etc.): see this posting for more info.

I think the following would be more logical:

![alt here](foo.png "caption text here")

Expected Output

html

  1. When both alt and caption are provided

Please do not use aria-hidden = "true" when figcaption is visually available on the screen. Screen-reader users should have the same information if possible (see this spec):

<figure>
<img src = "foo.png" alt = "alt text here"/>
<figcaption>caption here</figcaption>
</figure>
  1. Only when alt is provided

There is no need to visually display figcaption when it is not provided:

<figure>
<img src = "foo.png" alt = "alt text here"/>
</figure>

Or,

<figure>
<img src = "foo.png" alt = "alt text here"/>
<figcaption aria-hidden = "true"></figcaption>
</figure>
  1. Only when caption is provided:

Since alt text is more important than figcaption (accessibility wise), we can pass figcaption to alt:

<figure>
<img src = "foo.png" alt = "caption here"/>
<figcaption>caption here</figcaption>
</figure>
  1. Neither alt nor caption is provided.
<figure>
<img src = "foo.png" alt = ""/>
</figure>

Or,

<figure>
<img src = "foo.png" alt = ""/>
<figcaption aria-hidden = "true"></figcaption>
</figure>

docx

  1. When both alt and caption are provided

"alt here" goes to image title description; "caption here" is inserted as a visible text under the figure.

Currently, Pandoc's behavior is the other way around. Again, the proposed syntax is as follows:

![alt text](foo.png "visible text caption below")

  1. Only when alt is provided

There is no need to visually present caption text; however, still need to keep given alt text.

  1. Only when caption is provided:

Since alt text is more important than figcaption (accessibility wise), we should pass figcaption to alt while visually presenting the given caption text.

  1. Neither alt nor caption is provided.

Very rare case, but we need to pass alt as "" with no visible caption.

@mb21
Copy link
Collaborator

mb21 commented Oct 27, 2020

Looks like a duplicate of #4737, which was closed in favour of #3177 ?

@jgm
Copy link
Owner

jgm commented Oct 27, 2020

Yes. There's a simple reason we use alt rather than title for the caption: the title is a plain string; only the part between [] can have formatting. But the situation is less than ideal, as noted in #3177 and #4737.

@brunoprietog
Copy link

As a blind user, I agree with this, it would be great if they could implement it. Especially because caption and alt text are not the same, they have different purposes.

@tarleb
Copy link
Collaborator

tarleb commented May 6, 2021

I'm closing this in favor of #3177, but added an explicit note to that issue so we do not loose the valuable info here.

@tarleb tarleb closed this as completed May 6, 2021
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

5 participants