Skip to content

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

Open
1 of 1 issue completed
Open

Description

@story645

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.

Activity

  1. self-assigned this
    on Oct 30, 2022
  2. oscargus commented on Oct 31, 2022

    @oscargus
    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

  3. story645 commented on Oct 31, 2022

    @story645
    MemberAuthor

    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

  4. oscargus commented on Dec 1, 2022

    @oscargus
    Member

    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/

  5. tacaswell commented on May 9, 2024

    @tacaswell
    Member

    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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions