Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VoiceOver: Focus Returns to First Element Instead of Trigger Button After Closing Modal on iOS #45098

Open
akshay-daffodil-93 opened this issue Jun 21, 2024 · 7 comments
Labels
Component: Button Component: Modal Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Platform: iOS iOS applications. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@akshay-daffodil-93
Copy link

akshay-daffodil-93 commented Jun 21, 2024

Description

When VoiceOver is enabled on an iOS device, closing a modal by clicking the cancel button causes the focus to shift back to the first element of the screen instead of the button that triggered the modal. This issue negatively impacts the user experience for visually impaired users who rely on VoiceOver for navigation.

Steps to reproduce

  1. Ensure VoiceOver is enabled on the iOS device.
  2. Open the React Native application.
  3. Navigate to the screen that includes a header, body, and a button at the bottom of the screen.
  4. Click the button at the bottom of the screen to open the modal.
  5. Within the modal, click the cancel button to close the modal.
  6. Observe the focus behavior once the modal is closed.

React Native Version

0.74

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
    OS: macOS 13.6.5
    CPU: (8) arm64 Apple M1
    Memory: 121.14 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.1 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - ~/Desktop/project/sqh.projectorange.reactnative/node_modules/.bin/yarn
    npm: 10.5.0 - /opt/homebrew/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.10121639
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.15 => 0.71.8 
    react-native-macos: Not Found

Stacktrace or Logs

Since this issue is related to accessibility focus behavior, It will not generate any traditional error logs or stack traces.

Reproducer

https://github.com/akashsquare/accessibility_poc
https://snack.expo.dev/@akshay-sqh/accessibility-poc

Screenshots and Videos

video.MP4
Copy link

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@github-actions github-actions bot added Type: Unsupported Version Issues reported to a version of React Native that is no longer supported Needs: Author Feedback Component: Button Component: Modal Platform: iOS iOS applications. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Triage 🔍 labels Jun 21, 2024
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@cortinico cortinico added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jun 21, 2024
@akshay-daffodil-93
Copy link
Author

akshay-daffodil-93 commented Jul 2, 2024

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

Added snack example

@akshay-daffodil-93
Copy link
Author

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

Tested in latest RN version, issue still persists

@abhishek16pradhan
Copy link

Any update please on this issue

@abhishek1611p
Copy link

Any update please on the fix

@Akashm29
Copy link

Akashm29 commented Nov 27, 2024

Any update on this issue fix for ios (voiceOver)
Android: For android working fine
Ios: facing issue
Note: closing a modal by clicking the cancel button causes the focus to shift back to the first element of the screen instead of the button that triggered the modal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Button Component: Modal Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Platform: iOS iOS applications. Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

5 participants