Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Doc]: Add alt text to figures in documentation #24309

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

Open
1 of 14 tasks
story645 opened this issue Oct 30, 2022 · 4 comments
Open
1 of 14 tasks

[Doc]: Add alt text to figures in documentation #24309

story645 opened this issue Oct 30, 2022 · 4 comments

Comments

@story645
Copy link
Member

story645 commented Oct 30, 2022

Documentation Link

No response

Problem

None of our images have alt-text and that's becoming a standard now and our communication's guidelines say we should add alt-text when the platform allows.

Suggested improvement

The steps involved in having a consistent way to add alt text to our docs are

code

docs

  • replace alt text guidelines in communication guidelines with a standalone documentation page on alt-text for visualization best practices, update links in communications and pull requests guidelines to post to it.
  • write tutorial on making accessible viz
  • document using alt_aria as part of and alt text and update the PR template w/ a nudge to use alt text
  • add alt text to gallery files: I do it here in order of visibility, but traffic is probably a better way to prioritize)
    • plot gallery - it feeds the home page gallery so is probably highest profile
    • tutorials - doesn't always have code for the images
    • gallery
    • narrative text
    • older whats news and anything missing from the above

Adding alt text is piles of work and probably would benefit from strategy and partnerships w/ classes/sprints or hiring someone depending on timeline.

@oscargus
Copy link
Member

PDF does also support alt-texts (and has some other accessibility support). See 14.9.3 Alternate Descriptions in https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf

@story645
Copy link
Member Author

PDF does also support alt-texts (and has some other accessibility support).

I think a parallel issue to this one is track down which file types/backends support alt-text and update accordingly. Tom put in support for svg in #21328

@oscargus
Copy link
Member

oscargus commented Dec 1, 2022

I just sent an email to a Swedish researcher asking for some pointers. Let us see if I get some answer. Also, found this paper which seems quite relevant: https://content.iospress.com/articles/technology-and-disability/tad170181 (I have not read it yet, but I guess the references and citing papers can be worthwhile, even if we may not be interested in automation in the first place).

Edit: this may be worthwhile checking as well https://viewplus.com/product/audio-graphing-calculator/

@tacaswell
Copy link
Member

tacaswell commented May 9, 2024

https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_PNG_files

https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#alt-text-accessibility

https://exiv2.org/tags.html / https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf

There are reasonable places to put "alt text" (although IPTC makes a distinction between "ald text" and "image description").


options:

  • minimal: nothing (but docs)! currently fig.savefig('...png', metadata={'alt': 'The alt text'}) works (any key works), also works fig.savefig('/tmp/test.svg', metadata={'Description': 'This is alt text'}) , fig.savefig('/tmp/test.pdf', metadata={'Alt': 'This is alt text'}) also works (but warns). Other raster formats do not work (fails in imsave), but that is a matter of sorting out the right invocation to pillow.
  • medium: add a alt_text keyword to savefig that is threaded through each of the backends to translate to the correct name for that file format
  • medium++: add a alt_text or description attribute to Figure that is the default value threaded through savefig(..., alt_text)

open questions:

  • do any screen readers actually look at these?
  • if there are conflicting standards, how to we pick with standard to follow?

Other tasks:

  • if we do medium++, teach matplotlib-inline to extract the same for the html
  • if we do the medium++, teach sphinx-gallery to extract the same
  • if we do medium++ have our plot directive respect this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants