From efe0ac65198a680343f1dbb2941124ba32fc6d8d Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 15 Dec 2015 18:08:48 +0000 Subject: [PATCH] update website --- docs/accessibility.html | 2 +- docs/tutorial.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/accessibility.html b/docs/accessibility.html index c7fdfe7eb1b..ff4fae088c1 100644 --- a/docs/accessibility.html +++ b/docs/accessibility.html @@ -5,7 +5,7 @@ <View style={styles.button}> <Text style={styles.buttonText}>Press me!</Text> </View> -</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.

accessibilityTraits (iOS) #

Accessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits.

To use, set the accessibilityTraits property to one of (or an array of) accessibility trait strings:

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.

onMagicTap (iOS) #

Assign this property to a custom function which will be called when someone performs the "magic tap" gesture, which is a double-tap with two fingers. A magic tap function should perform the most relevant action a user could take on a component. In the Phone app on iPhone, a magic tap answers a phone call, or ends the current one. If the selected element does not have an onMagicTap function, the system will traverse up the view hierarchy until it finds a view that does.

accessibilityComponentType (Android) #

In some cases, we also want to alert the end user of the type of selected component (ie, that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on.

<TouchableWithoutFeedback accessibilityComponentType=”button” +</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.

accessibilityTraits (iOS) #

Accessibility traits tell a person using VoiceOver what kind of element they have selected. Is this element a label? A button? A header? These questions are answered by accessibilityTraits.

To use, set the accessibilityTraits property to one of (or an array of) accessibility trait strings:

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.

onMagicTap (iOS) #

Assign this property to a custom function which will be called when someone performs the "magic tap" gesture, which is a double-tap with two fingers. A magic tap function should perform the most relevant action a user could take on a component. In the Phone app on iPhone, a magic tap answers a phone call, or ends the current one. If the selected element does not have an onMagicTap function, the system will traverse up the view hierarchy until it finds a view that does.

accessibilityComponentType (Android) #

In some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). If we were using native buttons, this would work automatically. Since we are using javascript, we need to provide a bit more context for TalkBack. To do so, you must specify the ‘accessibilityComponentType’ property for any UI component. For instances, we support ‘button’, ‘radiobutton_checked’ and ‘radiobutton_unchecked’ and so on.

<TouchableWithoutFeedback accessibilityComponentType=”button” onPress={this._onPress}> <View style={styles.button}> <Text style={styles.buttonText}>Press me!</Text> diff --git a/docs/tutorial.html b/docs/tutorial.html index 91cd59bf5f7..169d560fe94 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -41,7 +41,7 @@ || Image || || || || Year || |+-------++----------------------+| -+---------------------------------+

We'll need to add another container in order to vertically lay out components within horizontally layed out components.

return ( ++---------------------------------+

We'll need to add another container in order to vertically lay out components within horizontally laid out components.

return ( <View style={styles.container}> <Image source={{uri: movie.posters.thumbnail}}