FormidableLabs / FormidableLabs/react-native-ama
useFocus does not seem to work in the iOS simulator (tested with VoiceOver)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 295
- Forks
- 22
- Ø Merge
- 20 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
[Sample git repo](https://github.com/lgibso34/expo-test-app)
[Snack ](https://snack.expo.dev/@theprocessor/a62648)that doesn't work because it can't install `react-native-ama` but it is the example from the [docs](https://formidable.com/open-source/react-native-ama/hooks/useFocus#set-focus-programmatically).
I have tried to use `useFocus` on two different projects (and machines), and neither work with the IOS simulator. I built a further third project and was able to run it on my personal iPhone with voiceover and it seemed to work. It does seem to work on a physical device fine.
Is there anything that can be done about this for those of us who use the IOS simulator as their primary development device?
I even copy/pasted the `useFocus` code and tried it as a standalone hook since it doesn't rely on anything from the ``. Same thing.
Any help would be appreciated.
Thank you!
Additional question:
Why is `AccessibilityInfo.setAccessibilityFocus(elementId);` ran twice in [useFocus](https://github.com/FormidableLabs/react-native-ama/blob/main/lib/hooks/useFocus.ts#L20)?
Beitragsleitfaden
Rechercherichtung
Beginne mit lib/hooks/useFocus.ts und reproduziere das gemeldete Verhalten mithilfe des verlinkten Beispiel-Repositorys oder des useFocus-Beispiels aus der Dokumentation in einem iOS-Simulator mit VoiceOver. Vergleiche das Ergebnis im Simulator mit einem physischen iPhone und ermittle anschließend, ob der doppelte AccessibilityInfo.setAccessibilityFocus-Aufruf oder das Verhalten des Simulators das Problem erklärt; abgeschlossen ist die Untersuchung, wenn eine bestätigte Ursache und eine abgestimmte Lösung oder Klarstellung in der Dokumentation vorliegen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native, typescript
- Bereich
- accessibility, mobile-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100