react-native-collapsible-tab-view
react-native-collapsible-tab-view copied to clipboard
AccessibilityState support needed in MaterialTabBar
Feature request
Currently, the MaterialTabBar component does not support setting the accessibilityState for the tab items. This is crucial for accessibility(voice over) as it helps screen readers identify the selected tab.
Current behavior
No accessibilityState is assigned.
My current container looks like this:
<Tabs.Container lazy
renderHeader={() => !isAccessibility && <TabHeader />}
renderTabBar={props => {
console.log(props); //return noting in console
return <MaterialTabBar {...props}
TabItemComponent={props => <MaterialTabItem {...props} pressColor="#000000" pressOpacity={1} />}
style={theme.topTabBar}
accessibilityRole="tablist"
/>
}}
>
props return noting in renderTabBar when logged. if they would return the active state for example props.isFocused then I can do:
<MaterialTabItem {...props} pressColor="#000000" pressOpacity={1} accessibilityState={{selected: props.isFocused}} />