There is no way to manage focus for external keyboard from one element to another
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.3k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das Verhalten auf physischen Android- und iOS-Geräten mit einer Hardwaretastatur anhand der beiden verlinkten Expo Snack-Beispiele zu reproduzieren. Verfolge, wie der Fokus beim Aktivieren der Schaltfläche „Send focus“ behandelt wird, und überprüfe anschließend, dass der Fokus ohne aktivierten Screenreader auf die Schaltfläche „Receive focus“ wechselt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native
- Bereich
- accessibility, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100