From 4f187074bfc08ddf7a708475ec613bae454100b4 Mon Sep 17 00:00:00 2001 From: Omeid Date: Tue, 21 Jun 2016 08:24:07 -0700 Subject: [PATCH] Components:Touchables: Expose Accessibility prop. Fix #6550 Summary: With accessibility prop set to true, it is not possible to access childern elements. This makes it impossible to test Components with appium and releatives. This commit adds support to change accessiblity property on Touchable elements to overcome the aforementioned issue. Closes https://github.com/facebook/react-native/pull/8243 Differential Revision: D3462949 Pulled By: javache fbshipit-source-id: 65ce6507a1619218ab5b527c970a74af197ef462 --- Libraries/Components/Touchable/TouchableBounce.js | 8 +++++++- Libraries/Components/Touchable/TouchableHighlight.js | 2 +- Libraries/Components/Touchable/TouchableOpacity.js | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Libraries/Components/Touchable/TouchableBounce.js b/Libraries/Components/Touchable/TouchableBounce.js index 72eee1e18..4f6e8cbf6 100644 --- a/Libraries/Components/Touchable/TouchableBounce.js +++ b/Libraries/Components/Touchable/TouchableBounce.js @@ -37,6 +37,12 @@ var TouchableBounce = React.createClass({ mixins: [Touchable.Mixin, NativeMethodsMixin], propTypes: { + /** + * When true, indicates that the view is an accessibility element. By default, + * all the touchable elements are accessible. + */ + accessible: React.PropTypes.bool, + onPress: React.PropTypes.func, onPressIn: React.PropTypes.func, onPressOut: React.PropTypes.func, @@ -129,7 +135,7 @@ var TouchableBounce = React.createClass({ return (