mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
[ReactNative] expose importantForAccessibility to JS
This commit is contained in:
@@ -100,6 +100,7 @@ var View = React.createClass({
|
||||
/**
|
||||
* Indicates to accessibility services to treat UI component like a
|
||||
* native one. Works for Android only.
|
||||
* @platform android
|
||||
*/
|
||||
accessibilityComponentType: PropTypes.oneOf([
|
||||
'none',
|
||||
@@ -111,6 +112,7 @@ var View = React.createClass({
|
||||
* 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.
|
||||
* @platform android
|
||||
*/
|
||||
accessibilityLiveRegion: PropTypes.oneOf([
|
||||
'none',
|
||||
@@ -118,9 +120,33 @@ var View = React.createClass({
|
||||
'assertive',
|
||||
]),
|
||||
|
||||
/**
|
||||
* Controls how view is important for accessibility which is if it
|
||||
* fires accessibility events and if it is reported to accessibility services
|
||||
* that query the screen. Works for Android only.
|
||||
* See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility
|
||||
* for references.
|
||||
* Possible values:
|
||||
* 'auto' - The system determines whether the view is important for accessibility -
|
||||
* default (recommended).
|
||||
* 'yes' - The view is important for accessibility.
|
||||
* 'no' - The view is not important for accessibility.
|
||||
* 'no-hide-descendants' - The view is not important for accessibility,
|
||||
* nor are any of its descendant views.
|
||||
*
|
||||
* @platform android
|
||||
*/
|
||||
importantForAccessibility: PropTypes.oneOf([
|
||||
'auto',
|
||||
'yes',
|
||||
'no',
|
||||
'no-hide-descendants',
|
||||
]),
|
||||
|
||||
/**
|
||||
* Provides additional traits to screen reader. By default no traits are
|
||||
* provided unless specified otherwise in element
|
||||
* @platform ios
|
||||
*/
|
||||
accessibilityTraits: PropTypes.oneOfType([
|
||||
PropTypes.oneOf(AccessibilityTraits),
|
||||
|
||||
Reference in New Issue
Block a user