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

[Android] Focus is removed from TextInput when Talkback is enabled #12205

Closed
oargaruna opened this issue Feb 4, 2017 · 29 comments
Closed

[Android] Focus is removed from TextInput when Talkback is enabled #12205

oargaruna opened this issue Feb 4, 2017 · 29 comments
Labels
Accessibility Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@oargaruna
Copy link

Description

Our project is a hybrid of React Native modules and native UI. We are adding accessibility to our App and are hitting a weird issue with Talkback in TextInput:

If there is any clickable element before a TextInput in the view hierarchy, double tapping to add focus to the TextInput using Talkback sends the focus to the clickable element before it.

Reproduction

I have been able to reproduce the bug in a sample app: https://github.com/oargaruna/TextInputTalkback

  1. Deploy the App on an Android device
  2. Enable Talkback (from Settings -> Accessibility) and open the Sample App
  3. Tap once on the TextInput to give it Talkback focus
  4. Tap twice to try to get the keyboard to come up

We expect the keyboard to show up with focus on the TextInput, but the focus jumps to the TouchableOpacity element defined before it.

If the TouchableOpacity element is removed, this behaviour is not reproducible.

Additional Information

  • React Native version: 0.41.1
  • Platform: Android
@JasonWang-MS
Copy link

Same issue for me. Any solution?

@hramos hramos added the Icebox label Jul 26, 2017
@hramos
Copy link
Contributor

hramos commented Jul 26, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos closed this as completed Jul 26, 2017
@projetolead
Copy link

This is still happening to me on RN 0.49.3. Any workarounds?

@lelandrichardson
Copy link
Contributor

Reopening this as it appears to be affecting us as well.

@backwardok
Copy link

Looks like this might be a dupe of #17042 ?

@haitaoli
Copy link
Contributor

haitaoli commented Jan 18, 2018

The issue is caused by this line of code:


It's been there forever. I guess it means the focus is always controlled by JS code. But when TalkBack is enabled the focus needs to be set directly.

@haitaoli
Copy link
Contributor

haitaoli commented Jan 19, 2018

Found some comments in code:

  // This component is controlled, so we want it to get focused only when JS ask it to do so.
  // Whenever android requests focus (which it does for random reasons), it will be ignored.

I wonder if this is still an issue in recent Android versions.

@oargaruna
Copy link
Author

The issue is not reproducible in 0.51.

@haitaoli
Copy link
Contributor

@oargaruna this only happens on Android 6.

@hramos hramos removed the Icebox label Mar 8, 2018
@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Component: TextInput Related to the TextInput component. Android labels Mar 16, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@RamyaSenk
Copy link

It is not working on Android 8.0 on latest version of react native as well.

@stale
Copy link

stale bot commented Jun 18, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 18, 2018
@BenWildeman
Copy link

BenWildeman commented Jun 29, 2018

still an issue in RN v0.54 and I'm currently testing on an Android 8.1 device. definitely not device specific when looking at the code linked by @haitaoli

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 29, 2018
@FLGMwt
Copy link
Contributor

FLGMwt commented Oct 5, 2018

This is still affecting Android 8.0 - RN 0.57.1

Do we have any context for the hack? We'd prefer not to maintain a fork, especially since that was explicitly referenced in the AirBnbB posts : P

@stale
Copy link

stale bot commented Jan 4, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 4, 2019
@BenWildeman
Copy link

still an issue, bot

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 4, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@JJBarata
Copy link

Hello, I'm currently using Android 8.1.0 with RN 0.51.0 and RN 0.58.3 (two apps) and both have the same problem when talkback is enabled, the keyboard does not appear when autofocus is in the textinput.
Does anyone still have the same problem yet?
Another thing I noticed is that this is happening intermittently, that is, sometimes it works, sometimes it does not work.
Thanks.

@raphaelssampaio
Copy link

raphaelssampaio commented Apr 2, 2019

I have the same problem here. I'm using RN 0.59.3

@dishantwalia
Copy link

Double tap and hold to long press on TextInput keyboard will come up, it's default behaviour. Works for me

@BenWildeman
Copy link

BenWildeman commented Apr 23, 2019

@dishantwalia that is not default behaviour. everything should be accessible by double tapping.

To explore by touch, slowly drag one finger around the screen. TalkBack announces the icons, buttons and other items as you drag your finger over them. When the focus reaches an item that you'd like to select, double tap anywhere on the screen to select the focused item.
https://support.google.com/accessibility/android/answer/6006598?hl=en-GB

you should make sure that whatever you're testing this against is actually an input field and not a wrapper. for instance, if you use the floating label input field type provided by Native Base, you can access the input field by double tapping on the wrapper

@fhugoduarte
Copy link

fhugoduarte commented Apr 23, 2019

I found a possible solution for this issue #24519

@stale
Copy link

stale bot commented Sep 4, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 4, 2019
@BenWildeman
Copy link

still an issue

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 4, 2019
@stale
Copy link

stale bot commented Dec 3, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 3, 2019
@BenWildeman
Copy link

still not fixed

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 3, 2019
@stale
Copy link

stale bot commented Mar 3, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 3, 2020
@stale
Copy link

stale bot commented Mar 10, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Mar 10, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests