streamlit icon indicating copy to clipboard operation
streamlit copied to clipboard

Allow TabIndex setting (with current behavior as default) to support accessibility

Open tom-flamelit opened this issue 1 year ago • 4 comments

Checklist

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

Summary

For accessibility purposes (especially section 508 testing and compliance), being able to control the tabindex property is helpful for keyboard navigability.

Why?

As a package, Streamlit is currently unintentionally hostile to accessibility patterns and standards due to reliance on iframes with insufficient ability for developers to control rendered page output. Allowing tabbing control helps in ensuring the page can be keyboard navigable, and starts to help screen reader compatibility.

How?

The streamlit.elements.iframe.IframeMixin class supports src, width, height, and scrolling objects that are passed to the protobuf object that is defined in the generated protobuf code at streamlit.proto.IFrame_pb2.py.

If this is the right place to put it, it would be helpful to add an optional argument to control the tab index set between -1, 0, and other values.

Additional Context

No response

tom-flamelit avatar Jan 17 '24 17:01 tom-flamelit

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

github-actions[bot] avatar Jan 17 '24 17:01 github-actions[bot]

Hello! Any interaction anticipated? (Don't want the thread to die without being seen by a person)

tom-flamelit avatar Feb 02 '24 22:02 tom-flamelit

Hey there! Thanks for the request. We see and read all GitHub issues but sometimes don't have time to reply to all of them (simply too many!). I assume this specifically applies to custom components and iframes?

Just want to note already that we won't get to work on this immediately. But if there are more upvotes, we will prioritize it accordingly!

jrieke avatar Feb 10 '24 00:02 jrieke

It would be wonderful to apply on this context, yes, as it would allow custom scripts to enter without losing keyboard focus. It would be a nice feature generally as well in standard components, but better to get it brought in to custom components. I appreciate you looking into this! Many of my end users have accessibility needs and this would help with keyboard focus.

On Fri, Feb 9, 2024, 7:53 PM Johannes Rieke @.***> wrote:

Hey there! Thanks for the request. We see and read all GitHub issues but sometimes don't have time to reply to all of them (simply too many!). I assume this specifically applies to custom components and iframes?

— Reply to this email directly, view it on GitHub https://github.com/streamlit/streamlit/issues/7969#issuecomment-1936780982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWX2S4XRFI5SHGKSDWR6QMLYS3AKFAVCNFSM6AAAAABB654C4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWG44DAOJYGI . You are receiving this because you authored the thread.Message ID: @.***>

tom-flamelit avatar Feb 10 '24 01:02 tom-flamelit