Skip to content

fix(navigation-bar): read tabs as tabs with position in VoiceOver - #5360

Open
Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/navigation-bar-tab-role
Open

Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/navigation-bar-tab-role

Conversation

@Priyanshu0007

Copy link
Copy Markdown
Contributor

Motivation

VoiceOver read tabs as plain buttons with no position. RN gives iOS no trait for role="tab"/"tablist", and the tablist View was flattened. On iOS the container now uses accessibilityRole="tabbar" and collapsable={false}. Android and web are unchanged.

Related issue

Fixes #5351

Screenshots / Videos

Before, then after.

iOS

navigation-bar-tabs-ios-before.mp4
navigation-bar-tabs-ios-after.mp4

Android

navigation-bar-tabs-android-before.mp4
navigation-bar-tabs-android-after.mp4

Web

navigation-bar-tabs-web-before.mp4
navigation-bar-tabs-web-after.mp4

Test plan

On iOS, open the NavigationBar example and swipe the tabs with VoiceOver: each reads "Tab, N of 4".

React Native maps role="tab" and role="tablist" to no iOS trait, so
VoiceOver read the tabs as plain buttons. On iOS the tab container now
uses accessibilityRole="tabbar" (UIAccessibilityTraitTabBar) and is kept
unflattened, so VoiceOver reads each tab as "Tab, N of M".

Fixes callstack#5351

This branch has not been deployed

No deployments
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.

NavigationBar: VoiceOver reads the tabs as buttons, with no tab role or position

1 participant