react-native-paper
react-native-paper copied to clipboard
fix: enable hiding other content when portal is used
Summary
I've attempted to fix an issue with Portals/Modals where content under the modal is still discoverable by screen readers.
With this PR, we can pass isFocused
to a Portal when the content in it should hide other content from screen readers.
This issue has been mentioned before for example point 6 in #1677
Happy to adjust if you think there's a better approach.
Test plan
- Add a modal inside a Portal from a screen with some content
- Turn on a screen reader, eg VoiceOver on iOS and swipe through the content of the screen
Hey @haakandev, thank you for your pull request 🤗. The documentation from this branch can be viewed here.
I'm going to:
- check the a11y issue mentioned in the description
- test changes
- confirm that everything works as expected
- review changes and resolve conflicts