There is no way to manage focus for external keyboard from one element to another
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il comportamento su dispositivi Android e iOS fisici con una tastiera hardware usando i due esempi Expo Snack collegati. Traccia la gestione del focus quando attivi il pulsante «Send focus», quindi verifica che il focus passi al pulsante «Receive focus» senza un lettore di schermo abilitato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react-native
- Ambito
- accessibility, mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100