question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AccessibilityInfo.setAccessibilityFocus does not work with Samsung Voice Assistant

See original GitHub issue

Description

According to the documentation, AccessibilityInfo.setAccessibilityFocus should set the screen reader’s focus to the given component across all platforms. However, on Samsung devices the call does nothing; that is, focus remains where it was before setAccessibilityFocus was called. The function works as expected in iOS and on Google phones.

The accessibility documentation contains an Android-specific example of setting focus using the native Accessibility Event system, but that code does not work on Samsung phones either. According to the AccessibilityInfo docs, setAccessibilityFocus uses the AccessibilityEvent system behind the scenes, so it makes sense that it wouldn’t work to use it directly either.

This is a major accessibility issue, as it makes building accessible overlays, dropdown menus, etc. extremely difficult. A fix would be very useful for the community.

React Native version:

System:
    OS: macOS 10.15.3
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 84.73 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.8.4 - /usr/local/bin/pod
  SDKs:
    iOS SDK: Not Found
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5900203
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Java: 13.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^16.13.1 => 16.13.1 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Open the attached Expo snack on a physical Samsung device
  2. Enable Voice Assistant (Settings > Accessibility > Screen Reader > Voice Assistant)
  3. Navigate back to the Expo app and highlight the button labeled “Select to set focus to bottom text”
  4. Double tap to activate the button and observe.

Expected Results

Focus should shift to the text at the bottom of the screen, “Jump to me!”.

Snack, code example, screenshot, or link to a repository:

The repro can be found in this snack: https://snack.expo.io/mMl5DkO!7 I was also able to reproduce the issue in a standalone Typescript project: https://github.com/Shanghai-/ReactNativeFocusProblem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
babylone-starcommented, Jun 24, 2020

+1. Can confirm same problem on a Samsung Galaxy Note S9

0reactions
blavallacommented, Jun 1, 2022

Feel free to re-open if this comes up again, but at this point Samsung has abandoned Voice Assistant and now ships devices with Talkback. Closing out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How turn on screen reader & turn off voice assistant on your ...
Find out how to turn on the screen reader function, turn off voice assistant or accessibility settings on your Samsung phone with our...
Read more >
react native - setAccessibilityFocus using ref not working
I'm using the ref prop along with findNodeHandle on a bunch of components in order to be able to trigger AccessibilityInfo.setAccessibilityFocus ...
Read more >
Accessibility - You.i TV Developer Portal
We support screen reader functionality for the following target platforms: Amazon Fire TV (VoiceView) · Android Touch (Android TalkBack, Samsung Voice Assistant) ...
Read more >
Accessibility - You.i TV Developer Portal
The following props are supported in You.i React Native for accessibility: ... support a few additional gestures available with Samsung's Voice Assistant.
Read more >
Fix issues with Google Assistant on your watch - Wear OS by ...
If you have trouble connecting to Google Assistant or sending messages on your watch, try these fixes. If you own a Samsung Galaxy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found