Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: hide inactive pages from screen reader in tabs (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 authored and osdnk committed Oct 30, 2019
1 parent 3a77107 commit 58f7115
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/bottom-tabs/src/views/BottomTabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,15 @@ export default class BottomTabView extends React.Component<Props, State> {
style={StyleSheet.absoluteFill}
isVisible={isFocused}
>
{descriptors[route.key].render()}
<View
accessibilityElementsHidden={!isFocused}
importantForAccessibility={
isFocused ? 'auto' : 'no-hide-descendants'
}
style={styles.content}
>
{descriptors[route.key].render()}
</View>
</ResourceSavingScene>
);
})}
Expand All @@ -236,4 +244,7 @@ const styles = StyleSheet.create({
pages: {
flex: 1,
},
content: {
flex: 1,
},
});

0 comments on commit 58f7115

Please sign in to comment.