Focus
The screen reader focus must be confined within the modal /alert /dialog. When the alert appears, the initial focus should be to a logical place or to where the default focus is for the device. (Android sometimes initially focuses on the CTAs in the alert, not the text or title)
- iOS Options
- accessibilityViewIsModal property
- accessibilityElementIsFocused
- isAccessibilityElement - Yes, if the element can respond to user input
- To move screen reader focus to newly revealed content: UIAccessibilityLayoutChangedNotification
- To NOT move focus, but announce new content: UIAccessibilityAnnouncementNotification
- Android Options
- android:focusable=true
- android=clickable=true
- Implement an onClick( ) event handler for keyboard, not onTouch( )
- nextFocusDown
- nextFocusUp
- nextFocusRight
- nextFocusLeft
- accessibilityTraversalBefore (or after)
- To move screen reader focus to newly revealed content: Type_View_Focused
- To NOT move focus, but announce new content: accessibilityLiveRegion
- To hide controls: Important_For _Accessibility_NO