Description
Sometimes we need to set external keyboard focus from one place to another, for instance from one Pressable to another Pressable, or from a Pressable to a View.
For Screen Reader users we can use AccessibilityInfo.setAccessibilityFocus(tag) to manage focus, but this technique does not work for the external keyboard when a screen reader is not switched on.
The standard React method of ref.current.focus() also does not work for external keyboard users on mobile (only web).
React Native Version
0.71.3
Output of npx react-native info
I don't have access to this.
Steps to reproduce
On Android or iOS physical device:
- Connect a hardware keyboard to the device using bluetooth.
- Open https://snack.expo.dev/@nedgip/external-keyboard-focus-example-1 in Expo Go
- Navigate to the Send focus button using arrow keys
- Press Space
Expected
Focus should move to the Receive focus button
Actual
Focus remains on the Send focus button
Snack, screenshot, or link to a repository
- https://snack.expo.dev/@nedgip/external-keyboard-focus-example-1
- https://snack.expo.dev/@nedgip/external-keyboard-focus-example-2
Description
Sometimes we need to set external keyboard focus from one place to another, for instance from one
Pressableto anotherPressable, or from aPressableto aView.For Screen Reader users we can use
AccessibilityInfo.setAccessibilityFocus(tag)to manage focus, but this technique does not work for the external keyboard when a screen reader is not switched on.The standard React method of
ref.current.focus()also does not work for external keyboard users on mobile (only web).React Native Version
0.71.3
Output of
npx react-native infoI don't have access to this.
Steps to reproduce
On Android or iOS physical device:
Expected
Focus should move to the Receive focus button
Actual
Focus remains on the Send focus button
Snack, screenshot, or link to a repository