File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -91,5 +91,6 @@ TabNavigator.Item props
9191| selected | none | boolean | return whether the item is selected |
9292| onPress | none | function | onPress method for Item |
9393| allowFontScaling | false | boolean | allow font scaling for title |
94-
95-
94+ | accessible | none | boolean | indicates if this item is an accessibility element |
95+ | accessibilityLabel | none | string | override text for screen readers |
96+ | testID | none | string | used to locate this item in end-to-end-tests |
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ import Layout from './Layout';
1717export default class Tab extends React . Component {
1818 static propTypes = {
1919 testID : PropTypes . string ,
20+ accessible : PropTypes . bool ,
21+ accessibilityLabel : PropTypes . string ,
2022 title : PropTypes . string ,
2123 titleStyle : Text . propTypes . style ,
2224 badge : PropTypes . element ,
@@ -68,6 +70,8 @@ export default class Tab extends React.Component {
6870 return (
6971 < TouchableNativeFeedback
7072 testID = { this . props . testID }
73+ accessible = { this . props . accessible }
74+ accessibilityLabel = { this . props . accessibilityLabel }
7175 background = { TouchableNativeFeedback . Ripple ( undefined , true ) }
7276 onPress = { this . _handlePress } >
7377 < View style = { tabStyle } >
@@ -83,6 +87,8 @@ export default class Tab extends React.Component {
8387 return (
8488 < TouchableOpacity
8589 testID = { this . props . testID }
90+ accessible = { this . props . accessible }
91+ accessibilityLabel = { this . props . accessibilityLabel }
8692 activeOpacity = { this . props . hidesTabTouch ? 1.0 : 0.8 }
8793 onPress = { this . _handlePress }
8894 style = { tabStyle } >
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ export default class TabNavigator extends React.Component {
122122 return (
123123 < Tab
124124 testID = { item . props . testID }
125+ accessible = { item . props . accessible }
126+ accessibilityLabel = { item . props . accessibilityLabel }
125127 title = { item . props . title }
126128 allowFontScaling = { item . props . allowFontScaling }
127129 titleStyle = { [
You can’t perform that action at this time.
0 commit comments