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

Add alt text to images & charts for improved accessibility #8563

Open
2 tasks done
jrieke opened this issue Apr 25, 2024 · 2 comments
Open
2 tasks done

Add alt text to images & charts for improved accessibility #8563

jrieke opened this issue Apr 25, 2024 · 2 comments
Labels
area:accessibility feature:charts Related to charting functionality feature:st.dataframe feature:st.image type:enhancement Requests for feature enhancements or new features

Comments

@jrieke
Copy link
Collaborator

jrieke commented Apr 25, 2024

Checklist

  • I have searched the existing issues for similar feature requests.
  • I added a descriptive title and summary to this issue.

Summary

Add a way for developers to add alt text to commands such as st.image and chart objects.

Why?

For accessibility reasons, images, charts, and other visualizations should always have alt text that describes the content.

How?

This should probably be a parameter that the developer can set since we can't automatically generate alt text (even though this might be a cool LLM application 😉 ). Maybe just a parameter alt or alt_text or alternative_text that accepts a string.

Elements for which we could/should add this:

Note that some of these elements also have other parameters to describe the content (e.g. st.image has a caption parameter), so we'd have to see how these two work together.

Additional Context

No response

@jrieke jrieke added type:enhancement Requests for feature enhancements or new features area:accessibility labels Apr 25, 2024
Copy link

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits

@hey-aw
Copy link

hey-aw commented May 21, 2024

Ideally, the caption would be used if present and no alt text provided.

It would be nice if st.image printed a console warning and explanation when no alt text was set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:accessibility feature:charts Related to charting functionality feature:st.dataframe feature:st.image type:enhancement Requests for feature enhancements or new features
Projects
None yet
Development

No branches or pull requests

3 participants