Permalink
Browse files

`accessibilityViewIsModal` property was exposed for any view (iOS only)

Reviewed By: mmmulani

Differential Revision: D4582786

fbshipit-source-id: 0902b8cc762042e772798ea7eaa350bc9d737cfb
  • Loading branch information...
shergin authored and facebook-github-bot committed Feb 28, 2017
1 parent 1b0d8ac commit b00c1fa3b66a2c9070a4dfc04aeed205a10d4798
Showing with 21 additions and 1 deletion.
  1. +12 −0 Libraries/Components/View/View.js
  2. +2 −1 React/Views/RCTViewManager.m
  3. +7 −0 docs/Accessibility.md
@@ -231,6 +231,18 @@ const View = React.createClass({
PropTypes.arrayOf(PropTypes.oneOf(AccessibilityTraits)),
]),
/**
* A value indicating whether VoiceOver should ignore the elements
* within views that are siblings of the receiver.
* Default is `false`.
*
* See the [Accessibility guide](docs/accessibility.html#accessibilitytraits-ios)
* for more information.
*
* @platform ios
*/
accessibilityViewIsModal: PropTypes.bool,
/**
* When `accessible` is true, the system will try to invoke this function
* when the user performs accessibility tap gesture.
@@ -114,10 +114,11 @@ - (RCTViewManagerUIBlock)uiBlockToAmendWithShadowViewRegistry:(__unused NSDictio
RCT_EXPORT_VIEW_PROPERTY(tvParallaxProperties, NSDictionary)
#endif
RCT_REMAP_VIEW_PROPERTY(accessible, isAccessibilityElement, BOOL)
RCT_EXPORT_VIEW_PROPERTY(accessibilityLabel, NSString)
RCT_EXPORT_VIEW_PROPERTY(accessibilityTraits, UIAccessibilityTraits)
RCT_EXPORT_VIEW_PROPERTY(accessibilityViewIsModal, BOOL)
RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
RCT_REMAP_VIEW_PROPERTY(accessible, isAccessibilityElement, BOOL)
RCT_REMAP_VIEW_PROPERTY(testID, accessibilityIdentifier, NSString)
RCT_REMAP_VIEW_PROPERTY(backfaceVisibility, layer.doubleSided, css_backface_visibility_t)
RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
View
@@ -74,6 +74,13 @@ To use, set the `accessibilityTraits` property to one of (or an array of) access
* **allowsDirectInteraction** Used when an element allows direct touch interaction for VoiceOver users (for example, a view representing a piano keyboard).
* **pageTurn** Informs VoiceOver that it should scroll to the next page when it finishes reading the contents of the element.
#### accessibilityViewIsModal (iOS)
A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.
For example, in a window that contains sibling views `A` and `B`, setting `accessibilityViewIsModal` to `true` on view `B` causes VoiceOver to ignore the elements in the view `A`.
On the other hand, if view `B` contains a child view `C` and you set `accessibilityViewIsModal` to `true` on view `C`, VoiceOver does not ignore the elements in view `A`.
#### onAccessibilityTap (iOS)
Use this property to assign a custom function to be called when someone activates an accessible element by double tapping on it while it's selected.

0 comments on commit b00c1fa

Please sign in to comment.