React-Native Accessibility Focus Order Issues
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 127k
- Forks
- 25.3k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 4
Description
Description
We are performing Accessibility testing in our React native app in iOS using Xcode Accessibility Inspector. We found few issues in focus order during the testing.
The components are read from left to right and top to bottom by default. We are not able to change the focus order as the components are not read in meaningful order. It could be better if there is a prop to configure the focus order by default and also, it should work across multiple components shown in the same screen.
In the video, it should traverse Text 1, Text 2, Text 3, etc instead of the current flow.
Focus is not staying on the triggered elements when a Modal/Keyboard/Drodown is closed. Instead, it is moving to the top of the screen. Ideally, the focus should stay and continue from the same element.
In the video, it should return to 'Button' instead of reading from the top.
Steps to reproduce
Open Xcode accessibility inspector and try to inspect any RN iOS app.
The components are traversed left to right and top to bottom.
Open a modal using a button. Once the modal is closed, the focus is not returning to the triggered button. But it is reading from the first element of the screen.
React Native Version
0.77.1
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 15.3.1
CPU: (10) arm64 Apple M1 Pro
Memory: 130.42 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.9.0
path: ~/.nvm/versions/node/v20.9.0/bin/node
Yarn: Not Found
npm:
version: 10.9.0
path: ~/.nvm/versions/node/v20.9.0/bin/npm
Watchman:
version: 2024.05.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: Not Found
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 2.7.6
path: /Users/kikumarm/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.1
wanted: 0.77.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
N/A
Reproducer
https://github.com/KishoreKumar186/rn-awesome-project/
Screenshots and Videos
https://github.com/user-attachments/assets/87393189-2a94-4da6-aa7a-b0e2c1700853
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le reproducer lié et examinez le comportement signalé à l’aide de Xcode Accessibility Inspector sur iOS. Vérifiez le parcours attendu de Text 1, Text 2 et Text 3 et confirmez que la fermeture d’une modale, du clavier ou d’une liste déroulante redonne le focus à l’élément déclencheur ; le travail est terminé lorsque les deux comportements sont pris en charge pour les composants indiqués.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- ios, react-native
- Domaine
- accessibility, mobile
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100