File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,13 @@ exports.examples = [
208208 {
209209 title : 'Auto-focus' ,
210210 render : function ( ) {
211- return < TextInput autoFocus = { true } style = { styles . singleLine } /> ;
211+ return (
212+ < TextInput
213+ autoFocus = { true }
214+ style = { styles . singleLine }
215+ accessibilityLabel = "I am the accessibility label for text input"
216+ />
217+ ) ;
212218 }
213219 } ,
214220 {
Original file line number Diff line number Diff line change @@ -348,7 +348,13 @@ exports.examples = [
348348 {
349349 title : 'Auto-focus' ,
350350 render : function ( ) {
351- return < TextInput autoFocus = { true } style = { styles . default } /> ;
351+ return (
352+ < TextInput
353+ autoFocus = { true }
354+ style = { styles . default }
355+ accessibilityLabel = "I am the accessibility label for text input"
356+ />
357+ ) ;
352358 }
353359 } ,
354360 {
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ var TouchableFeedbackEvents = React.createClass({
144144 < TouchableOpacity
145145 style = { styles . wrapper }
146146 testID = "touchable_feedback_events_button"
147+ accessibilityLabel = "touchable feedback events"
148+ accessibilityTraits = "button"
149+ accessibilityComponentType = "button"
147150 onPress = { ( ) => this . _appendEvent ( 'press' ) }
148151 onPressIn = { ( ) => this . _appendEvent ( 'pressIn' ) }
149152 onPressOut = { ( ) => this . _appendEvent ( 'pressOut' ) }
Original file line number Diff line number Diff line change @@ -290,10 +290,6 @@ var TextInput = React.createClass({
290290 * Styles
291291 */
292292 style : Text . propTypes . style ,
293- /**
294- * Used to locate this view in end-to-end tests
295- */
296- testID : PropTypes . string ,
297293 /**
298294 * The color of the textInput underline.
299295 * @platform android
@@ -457,6 +453,9 @@ var TextInput = React.createClass({
457453 < TouchableWithoutFeedback
458454 onPress = { this . _onPress }
459455 rejectResponderTermination = { true }
456+ accessible = { props . accessible }
457+ accessibilityLabel = { props . accessibilityLabel }
458+ accessibilityTraits = { props . accessibilityTraits }
460459 testID = { props . testID } >
461460 { textContainer }
462461 </ TouchableWithoutFeedback >
@@ -520,6 +519,9 @@ var TextInput = React.createClass({
520519 return (
521520 < TouchableWithoutFeedback
522521 onPress = { this . _onPress }
522+ accessible = { this . props . accessible }
523+ accessibilityLabel = { this . props . accessibilityLabel }
524+ accessibilityComponentType = { this . props . accessibilityComponentType }
523525 testID = { this . props . testID } >
524526 { textContainer }
525527 </ TouchableWithoutFeedback >
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ var TouchableBounce = React.createClass({
117117 < Animated . View
118118 style = { [ { transform : [ { scale : this . state . scale } ] } , this . props . style ] }
119119 accessible = { true }
120+ accessibilityLabel = { this . props . accessibilityLabel }
121+ accessibilityComponentType = { this . props . accessibilityComponentType }
122+ accessibilityTraits = { this . props . accessibilityTraits }
120123 testID = { this . props . testID }
121124 onStartShouldSetResponder = { this . touchableHandleStartShouldSetResponder }
122125 onResponderTerminationRequest = { this . touchableHandleResponderTerminationRequest }
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ var TouchableHighlight = React.createClass({
215215 return (
216216 < View
217217 accessible = { true }
218+ accessibilityLabel = { this . props . accessibilityLabel }
218219 accessibilityComponentType = { this . props . accessibilityComponentType }
219220 accessibilityTraits = { this . props . accessibilityTraits }
220221 ref = { UNDERLAY_REF }
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ var TouchableNativeFeedback = React.createClass({
200200 ...onlyChild ( this . props . children ) . props ,
201201 nativeBackgroundAndroid : this . props . background ,
202202 accessible : this . props . accessible !== false ,
203+ accessibilityLabel : this . props . accessibilityLabel ,
203204 accessibilityComponentType : this . props . accessibilityComponentType ,
204205 accessibilityTraits : this . props . accessibilityTraits ,
205206 testID : this . props . testID ,
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ var TouchableOpacity = React.createClass({
154154 return (
155155 < Animated . View
156156 accessible = { true }
157+ accessibilityLabel = { this . props . accessibilityLabel }
157158 accessibilityComponentType = { this . props . accessibilityComponentType }
158159 accessibilityTraits = { this . props . accessibilityTraits }
159160 style = { [ this . props . style , { opacity : this . state . anim } ] }
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ var TouchableWithoutFeedback = React.createClass({
135135 // Note(avik): remove dynamic typecast once Flow has been upgraded
136136 return ( React : any ) . cloneElement ( onlyChild ( this . props . children ) , {
137137 accessible : this . props . accessible !== false ,
138+ accessibilityLabel : this . props . accessibilityLabel ,
138139 accessibilityComponentType : this . props . accessibilityComponentType ,
139140 accessibilityTraits : this . props . accessibilityTraits ,
140141 testID : this . props . testID ,
You can’t perform that action at this time.
0 commit comments