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

docs: Update Modal.tsx description to note a11y limitations #4280

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meatnordrink
Copy link
Sponsor Contributor

Motivation

Currently, the RNP modal is nearly totally non-accessible, because it renders outside the normal element hierarchy, and so a screen-reader user, navigating by the most common methods (next-element swipe or next-heading), will continue on the page without even being aware the modal has opened. The intended behavior for modals (as seen with the React Native modal, or web modals), is for focus to shift to the modal as soon as the modal opens. With the RNP modal, focus remains unaffected, leaving the screen-reader user unaware a modal has even opened, and unable to reach it via the most common navigation actions (next-element or next-heading).

This adds a note to the docs making end-users aware of this limitation. This is vitally important, as currently any app implementing the RNP modal becomes an inaccessible app. (This was responsible for 8 of the top issues in our app flagged during an external accessibility audit, and resulted in us having to pull out all the RNP modals and replace them with either bottomsheets or generic RN modals.) End users need to be aware of this limitation before they choose to use this component.

Related issue

This is related to #3912, but does not address it; it just makes end-users aware of the issue.

Test plan

Check that text is clear and correctly formatted.

@callstack-bot
Copy link

Hey @meatnordrink, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

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 this pull request may close these issues.

None yet

2 participants