diff --git a/docs/next/accessibility.html b/docs/next/accessibility.html index c9e34a6d979..03dd5a6b949 100644 --- a/docs/next/accessibility.html +++ b/docs/next/accessibility.html @@ -45,10 +45,10 @@

In the above example, we can't get accessibility focus separately on 'text one' and 'text two'. Instead we get focus on a parent view with 'accessible' property.

accessibilityLabel (iOS, Android)

When a view is marked as accessible, it is a good practice to set an accessibilityLabel on the view, so that people who use VoiceOver know what element they have selected. VoiceOver will read this string when a user selects the associated element.

-

To use, set the accessibilityLabel property to a custom string on your View:

+

To use, set the accessibilityLabel property to a custom string on your View, Text or Touchable:

<TouchableOpacity
   accessible={true}
-  accessibilityLabel={'Tap me!'}
+  accessibilityLabel="Tap me!"
   onPress={this._onPress}>
   <View style={styles.button}>
     <Text style={styles.buttonText}>Press me!</Text>
@@ -56,6 +56,20 @@
 </TouchableOpacity>
 

In the above example, the accessibilityLabel on the TouchableOpacity element would default to "Press me!". The label is constructed by concatenating all Text node children separated by spaces.

+

accessibilityHint (iOS)

+

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

+

To use, set the accessibilityHint property to a custom string on your View, Text or Touchable:

+
<TouchableOpacity
+  accessible={true}
+  accessibilityLabel="Go back"
+  accessibilityHint="Navigates to the previous screen"
+  onPress={this._onPress}>
+  <View style={styles.button}>
+    <Text style={styles.buttonText}>Back</Text>
+  </View>
+</TouchableOpacity>
+
+

In the above example, VoiceOver will read the hint after the label, if the user has hints enabled in the device's VoiceOver settings. Read more about guidelines for accessibilityHint in the iOS Developer Docs

accessibilityRole (iOS, Android)

Note: Accessibility Role and Accessibility States are meant to be a cross-platform solution to replace accessibilityTraits and accessibilityComponentType, which will soon be deprecated. When possible, use accessibilityRole and accessibilityStates instead of accessibilityTraits and accessibilityComponentType.

diff --git a/docs/next/accessibility/index.html b/docs/next/accessibility/index.html index c9e34a6d979..03dd5a6b949 100644 --- a/docs/next/accessibility/index.html +++ b/docs/next/accessibility/index.html @@ -45,10 +45,10 @@

In the above example, we can't get accessibility focus separately on 'text one' and 'text two'. Instead we get focus on a parent view with 'accessible' property.

accessibilityLabel (iOS, Android)

When a view is marked as accessible, it is a good practice to set an accessibilityLabel on the view, so that people who use VoiceOver know what element they have selected. VoiceOver will read this string when a user selects the associated element.

-

To use, set the accessibilityLabel property to a custom string on your View:

+

To use, set the accessibilityLabel property to a custom string on your View, Text or Touchable:

<TouchableOpacity
   accessible={true}
-  accessibilityLabel={'Tap me!'}
+  accessibilityLabel="Tap me!"
   onPress={this._onPress}>
   <View style={styles.button}>
     <Text style={styles.buttonText}>Press me!</Text>
@@ -56,6 +56,20 @@
 </TouchableOpacity>
 

In the above example, the accessibilityLabel on the TouchableOpacity element would default to "Press me!". The label is constructed by concatenating all Text node children separated by spaces.

+

accessibilityHint (iOS)

+

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

+

To use, set the accessibilityHint property to a custom string on your View, Text or Touchable:

+
<TouchableOpacity
+  accessible={true}
+  accessibilityLabel="Go back"
+  accessibilityHint="Navigates to the previous screen"
+  onPress={this._onPress}>
+  <View style={styles.button}>
+    <Text style={styles.buttonText}>Back</Text>
+  </View>
+</TouchableOpacity>
+
+

In the above example, VoiceOver will read the hint after the label, if the user has hints enabled in the device's VoiceOver settings. Read more about guidelines for accessibilityHint in the iOS Developer Docs

accessibilityRole (iOS, Android)

Note: Accessibility Role and Accessibility States are meant to be a cross-platform solution to replace accessibilityTraits and accessibilityComponentType, which will soon be deprecated. When possible, use accessibilityRole and accessibilityStates instead of accessibilityTraits and accessibilityComponentType.

diff --git a/docs/next/text.html b/docs/next/text.html index cb69dc34db0..624224ad744 100644 --- a/docs/next/text.html +++ b/docs/next/text.html @@ -199,6 +199,8 @@ AppRegistry.registerComponent('AwesomeProject', () => BlueIsCool);

Props