Repository navigation
fix(ios): expose pages to VoiceOver - #1266
Open
AurelienV-42 wants to merge 1 commit into
Open
AurelienV-42 wants to merge 1 commit into
AurelienV-42 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On iOS, the SwiftUI
TabViewshows each page to accessibility as one full-screen element. VoiceOver can still read a page element by element, but its rotor can't search inside the page: headings, links and form controls on the page never show up in the rotor. Screen reader users rely on headings to navigate long screens, so a feed inside a pager (for example withreact-native-tab-view) can only be read linearly.This PR:
accessibilityElementsonPagerViewProviderso it exposes the React Native view of the current page directly;accessibilityScrollso the VoiceOver three-finger swipe still changes page (exposing the page directly skips TabView's own handling). It supports RTL and vertical orientation, respectsscrollEnabled, and moves VoiceOver focus to the new page.Test plan
Tested on a physical iPhone with VoiceOver on, using the example app (with
accessibilityRole="header"added locally to the page title):