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: alt text for images Word documents #2754

Closed
fstorr opened this issue Mar 2, 2016 · 10 comments · Fixed by #2771
Closed

Accessibility: alt text for images Word documents #2754

fstorr opened this issue Mar 2, 2016 · 10 comments · Fixed by #2771

Comments

@fstorr
Copy link

fstorr commented Mar 2, 2016

It would be great if Pandoc put alt text from images into Word's "Alt Text" Description panel. This would allow authors create accessible documents because the alt text can be used by people reliant on assistive technology (for example, a screen reader) to understand the image. This should happen for inline images and also images placed on their own lines. A markdown example would be:

![a pony running through a meadow](images/pony.png)

The text "a pony running through a meadow" would be placed into the Description panel of Word's Alt Text panel. WebAIM has an article on this here: http://webaim.org/techniques/word/ Although the screen shots are old, I've just checked the claims about using the Description panel rather than the Title one and they're still correct. Manually adding alt text to images in Word documents is painful, so this feature, if possible to implement, would be very welcome.

@mb21
Copy link
Collaborator

mb21 commented Mar 5, 2016

For some reason, the docx writer currently uses the title text instead of the alt text. Not sure whether this is intended behaviour or not. Meanwhile, you can use the title text, as in:

![alt text](foo.jpg "title text")

@jmuheim
Copy link

jmuheim commented Mar 8, 2016

I have a similar problem, described on StackOverflow: How to set an image's alt-text with pandoc for docx conversion

The thing is, that the title-attribute (from an accessibility view) always is redundant information, as no general pattern has emerged during the many years of its existence on how to use it. For example, some screenreaders announce it automatically, some don't, and some browsers display it on hover, some don't, and keyboard-only users will never see it.

From an accessibility point of view, thus, the title-attribute should completely be rejected, and all relevant information must be somewhere else (e.g. the alt-attribute). This means that setting the title-attribute so the Docx-Writer can use it results in redundant information in other writers (e.g. HTML), which is unwanted for screenreader-users (who have to bear and filter a lot of information on one sequential auditive channel already anyway).

So IMHO the title-attribute should be neglected completely by Pandoc.

@jmuheim
Copy link

jmuheim commented Mar 8, 2016

@fstorr
Copy link
Author

fstorr commented Mar 8, 2016

The title attribute shouldn't be completely rejected because it does have limited use. The Paciello Group's Using the HTML title attribute – updated shows these use cases. Additionally, WCAG 2.0's Using the title attribute of the frame and iframe elements document explicitly states that the title attribute should be used to give accessible names to iframes. I put an HTML page together yesterday to test screen reader support for the title attribute on iframes and it works well.

@mb21
Copy link
Collaborator

mb21 commented Mar 8, 2016

@lierdakil @jkr do you know why the docx writer currently uses the title text instead of the alt text? is there any undocumented reason for that or just an oversight?

@jgm
Copy link
Owner

jgm commented Mar 9, 2016

Probably just ignorance (I wrote the writer).

+++ Mauro Bieg [Mar 08 16 10:42 ]:

[1]@lierdakil [2]@jkr do you know why the [3]docx writer currently uses
the title text instead of the alt text? is there any undocumented
reason for that or just an oversight?


Reply to this email directly or [4]view it on GitHub.

References

  1. https://github.com/lierdakil
  2. https://github.com/jkr
  3. https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Writers/Docx.hs#L1157
  4. Accessibility: alt text for images Word documents #2754 (comment)

mb21 added a commit to mb21/pandoc that referenced this issue Mar 9, 2016
mb21 added a commit to mb21/pandoc that referenced this issue Mar 9, 2016
mb21 added a commit to mb21/pandoc that referenced this issue Mar 10, 2016
@jgm jgm closed this as completed in #2771 Mar 10, 2016
@jmuheim
Copy link

jmuheim commented Jul 21, 2016

Will there be any change to this? Why not simply use the alt-attribute instead of title?

@lierdakil
Copy link
Contributor

@jmuheim docx writer was fixed with 139fa54, which should be released since 1.17. So what exactly is the problem?

@jmuheim
Copy link

jmuheim commented Jul 21, 2016

Oh, I'm sorry, didn't notice that. I'm still on 1.16.

Thank you.

On 21 Jul 2016, at 13:16, Nikolay Yakimov notifications@github.com wrote:

@jmuheim https://github.com/jmuheim docx writer was fixed with 139fa54 139fa54, which should be released since 1.17. So what exactly is the problem?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #2754 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ABuxx7vA7FsWw8VIVH3og5Q1yALrt8B-ks5qX1UngaJpZM4Hn0Pn.

@jmuheim
Copy link

jmuheim commented Nov 1, 2017

I noticed that on my server is installed pandoc 1.16.0.2, and there it already seems to be fixed (which is a good thing).

So was the fix introduced earlier than 1.17? I'm a bit confused about this right now.

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

Successfully merging a pull request may close this issue.

5 participants