[ReactNative] implement accessibilityLiveRegion and accessibilityComponentType

This commit is contained in:
Dorota Kapturkiewicz 2015-07-30 01:28:14 -07:00
parent d8a13ec3d5
commit 8a272bc873
2 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,7 @@ var AccessibilityTraits = [
'pageTurn',
];
// <<<<< WARNING >>>>>
// If adding any properties to View that could change the way layout-only status
// works on iOS, make sure to update ReactNativeViewAttributes.js and
@ -105,6 +106,18 @@ var View = React.createClass({
'button',
]),
/**
* Indicates to accessibility services whether the user should be notified
* when this view changes. Works for Android API >= 19 only.
* See http://developer.android.com/reference/android/view/View.html#attr_android:accessibilityLiveRegion
* for references.
*/
accessibilityLiveRegion: PropTypes.oneOf([
'none',
'polite',
'assertive',
]),
/**
* Provides additional traits to screen reader. By default no traits are
* provided unless specified otherwise in element

View File

@ -20,6 +20,7 @@ ReactNativeViewAttributes.UIView = {
accessible: true,
accessibilityLabel: true,
accessibilityComponentType: true,
accessibilityLiveRegion: true,
accessibilityTraits: true,
testID: true,
onLayout: true,