From 33d8db599ef8eb85dc27150e04c71719be6ffd26 Mon Sep 17 00:00:00 2001 From: fangmobile Date: Thu, 4 Feb 2016 05:12:36 -0800 Subject: [PATCH] added accessibility props for touchables Summary: accessibilityLabels are missing in these touchable*.js files. for #5322 ide This is not tested yet. I will update with test. Closes https://github.com/facebook/react-native/pull/5346 Reviewed By: svcscm Differential Revision: D2882061 Pulled By: gkassabli fb-gh-sync-id: dff0ef373e5f5895027cb1cc08c8887a6ace8eee --- Examples/UIExplorer/TextInputExample.android.js | 8 +++++++- Examples/UIExplorer/TextInputExample.ios.js | 8 +++++++- Examples/UIExplorer/TouchableExample.js | 3 +++ Libraries/Components/TextInput/TextInput.js | 10 ++++++---- Libraries/Components/Touchable/TouchableBounce.js | 3 +++ Libraries/Components/Touchable/TouchableHighlight.js | 1 + .../Touchable/TouchableNativeFeedback.android.js | 1 + Libraries/Components/Touchable/TouchableOpacity.js | 1 + .../Components/Touchable/TouchableWithoutFeedback.js | 1 + 9 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Examples/UIExplorer/TextInputExample.android.js b/Examples/UIExplorer/TextInputExample.android.js index f3691f14ba86b8..3652b974c8fc19 100644 --- a/Examples/UIExplorer/TextInputExample.android.js +++ b/Examples/UIExplorer/TextInputExample.android.js @@ -208,7 +208,13 @@ exports.examples = [ { title: 'Auto-focus', render: function() { - return ; + return ( + + ); } }, { diff --git a/Examples/UIExplorer/TextInputExample.ios.js b/Examples/UIExplorer/TextInputExample.ios.js index 49e28ffced8a83..eac262d7706157 100644 --- a/Examples/UIExplorer/TextInputExample.ios.js +++ b/Examples/UIExplorer/TextInputExample.ios.js @@ -348,7 +348,13 @@ exports.examples = [ { title: 'Auto-focus', render: function() { - return ; + return ( + + ); } }, { diff --git a/Examples/UIExplorer/TouchableExample.js b/Examples/UIExplorer/TouchableExample.js index dd3b2c9c89f7a6..515a0c2b858c03 100644 --- a/Examples/UIExplorer/TouchableExample.js +++ b/Examples/UIExplorer/TouchableExample.js @@ -144,6 +144,9 @@ var TouchableFeedbackEvents = React.createClass({ this._appendEvent('press')} onPressIn={() => this._appendEvent('pressIn')} onPressOut={() => this._appendEvent('pressOut')} diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index e72c98cdfa937c..7a902576c7ef3e 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -290,10 +290,6 @@ var TextInput = React.createClass({ * Styles */ style: Text.propTypes.style, - /** - * Used to locate this view in end-to-end tests - */ - testID: PropTypes.string, /** * The color of the textInput underline. * @platform android @@ -457,6 +453,9 @@ var TextInput = React.createClass({ {textContainer} @@ -520,6 +519,9 @@ var TextInput = React.createClass({ return ( {textContainer} diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index d3c1696769e8cc..1d7abcc71e8397 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -117,6 +117,9 @@ var TouchableBounce = React.createClass({