0

On my project I want to move the accessibility (f.e. VoiceOver) focus on a different component, but I can't find any good, well documented, approach. The use-case is that after clicking the button I want to open the modal and focus proper component inside that modal.

I found two different solutions, but both of them has some flaws:

  1. Move focus with help of AccessibilityInfo.setAccessibilityFocus . But this method requires reactTag which can be only obtained with deprecated findNodeHandle function
  2. Use AccessibilityInfo.sendAccessibilityEvent passing "focus" and component ref. The problem with this one is that it's not documented method.

I'm expecting to find the approach which won't involve any deprecated methods and will be documented.

  • 1
    I'm not a react-native developer but the VO focus will follow the keyboard focus. (Yes, you can use a keyboard with mobile devices.) Is there a react method/function that can move the keyboard focus? Something analogous to the `focus()` method in javascript? – slugolicious Apr 19 '23 at 16:21

0 Answers0