You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/accessibility.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ To use, set the `accessibilityLabel` property to a custom string on your View, T
48
48
49
49
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.
A reference to another element [nativeID](view.md#nativeid) used to build complex forms.
54
54
The value of `accessibilityLabelledBy` should match the `nativeID` of the related element:
@@ -83,15 +83,15 @@ Provide the `accessibilityHint` property a custom string on your View, Text, or
83
83
</TouchableOpacity>
84
84
```
85
85
86
-
<divclass="label ios basic">iOS</div>
86
+
<divclassName="label ios basic">iOS</div>
87
87
88
88
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](https://developer.apple.com/documentation/objectivec/nsobject/1615093-accessibilityhint)
89
89
90
-
<divclass="label android basic">Android</div>
90
+
<divclassName="label android basic">Android</div>
91
91
92
92
In the above example, TalkBack will read the hint after the label. At this time, hints cannot be turned off on Android.
By using the `accessibilityLanguage` property, the screen reader will understand which language to use while reading the element's **label**, **value**, and **hint**. The provided string value must follow the [BCP 47 specification](https://www.rfc-editor.org/info/bcp47).
97
97
@@ -104,11 +104,11 @@ By using the `accessibilityLanguage` property, the screen reader will understand
Inverting screen colors is an accessibility feature available in iOS and iPadOS for people with color blindness, low vision, or vision impairment. If there's a view you don't want to invert when this setting is on, possibly a photo, set this property to `true`.
When components dynamically change, we want TalkBack to alert the end user. This is made possible by the `accessibilityLiveRegion` property. It can be set to `none`, `polite`, and `assertive`:
114
114
@@ -165,13 +165,13 @@ In the above example method `addOne` changes the state variable `count`. When th
165
165
-**toolbar** Used to represent a toolbar (a container of action buttons or components).
166
166
-**grid** Used with ScrollView, VirtualizedList, FlatList, or SectionList to represent a grid. Adds the in/out of grid announcements to Android's GridView.
A boolean value that indicates whether VoiceOver should ignore the elements within views that are siblings of the receiver.
220
220
221
221
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 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`.
Identifies the element that labels the element it is applied to. The value of `aria-labelledby` should match the [`nativeID`](view.md#nativeid) of the related element:
298
298
@@ -307,7 +307,7 @@ Identifies the element that labels the element it is applied to. The value of `a
Indicates that an element will be updated and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
313
313
@@ -321,7 +321,7 @@ Indicates that an element will be updated and describes the types of updates the
In the case of two overlapping UI components with the same parent, default accessibility focus can have unpredictable behavior. The `importantForAccessibility` property will resolve this by controlling if a view fires accessibility events and if it is reported to accessibility services. It can be set to `auto`, `yes`, `no` and `no-hide-descendants` (the last value will force accessibility services to ignore the component and all of its children).
343
343
@@ -358,15 +358,15 @@ In the case of two overlapping UI components with the same parent, default acces
358
358
359
359
In the above example, the `yellow` layout and its descendants are completely invisible to TalkBack and all other accessibility services. So we can use overlapping views with the same parent without confusing TalkBack.
Assign this property to a custom function which will be called when someone performs the "escape" gesture, which is a two finger Z shaped gesture. An escape function should move back hierarchically in the user interface. This can mean moving up or back in a navigation hierarchy or dismissing a modal user interface. If the selected element does not have an `onAccessibilityEscape` function, the system will attempt to traverse up the view hierarchy until it finds a view that does or bonk to indicate it was unable to find one.
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.
372
372
@@ -464,7 +464,7 @@ To handle action requests, a component must implement an `onAccessibilityAction`
464
464
465
465
The `AccessibilityInfo` API allows you to determine whether or not a screen reader is currently active. See the [AccessibilityInfo documentation](accessibilityinfo) for details.
Sometimes it is useful to trigger an accessibility event on a UI component (i.e. when a custom view appears on a screen or set accessibility focus to a view). Native UIManager module exposes a method ‘sendAccessibilityEvent’ for this purpose. It takes two arguments: a view tag and a type of event. The supported event types are `typeWindowStateChanged`, `typeViewFocused`, and `typeViewClicked`.
470
470
@@ -479,7 +479,7 @@ if (Platform.OS === 'android') {
479
479
}
480
480
```
481
481
482
-
## Testing TalkBack Support <divclass="label android">Android</div>
482
+
## Testing TalkBack Support <divclassName="label android">Android</div>
483
483
484
484
To enable TalkBack, go to the Settings app on your Android device or emulator. Tap Accessibility, then TalkBack. Toggle the "Use service" switch to enable or disable it.
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
500
500
```
501
501
502
-
## Testing VoiceOver Support <divclass="label ios">iOS</div>
502
+
## Testing VoiceOver Support <divclassName="label ios">iOS</div>
503
503
504
504
To enable VoiceOver on your iOS or iPadOS device, go to the Settings app, tap General, then Accessibility. There you will find many tools available for people to enable their devices to be more usable, including VoiceOver. To enable VoiceOver, tap on VoiceOver under "Vision" and toggle the switch that appears at the top.
0 commit comments