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

accessibilityStates = [disabled] can not be removed on iOS #21122

Closed
benzman81 opened this issue Sep 14, 2018 · 4 comments
Closed

accessibilityStates = [disabled] can not be removed on iOS #21122

benzman81 opened this issue Sep 14, 2018 · 4 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.

Comments

@benzman81
Copy link

Environment

React Native Environment Info:
System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 40.76 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
react-native-app-id: 0.0.5
react-native-cli: 2.0.1

Description

If accessibilityStates is set to [disabled] it can not be removed on iOS by setting accessibilityStates to empty array or null. The Accessibility Inspector still shows the button as disabled.

Reproducible Demo

Simple attached App.js to reproduce by activating button on switch. (needed to rename to txt)
App.txt

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Sep 14, 2018
@jmensch1
Copy link

I'm having the same problem with the the 'selected' option for accessibilityStates -- once the state is set to 'selected', it can't be removed.

@markowork
Copy link

markowork commented Nov 22, 2018

Yep - this should really get fixed!
One possible workaround is to force recreating of your element, setting something like key=new Date() but it doesn't help in all cases (for example if your element has an animation)

@jmensch1
Copy link

jmensch1 commented Nov 22, 2018

that key trick worked for me, thanks :)

@estevaolucas
Copy link

estevaolucas commented Mar 18, 2019

This issue got fixed since v0.57.6 with this commit 5eaa2d2

cc @hramos @cpojer

@hramos hramos added the Resolution: Fixed A PR that fixes this issue has been merged. label Mar 19, 2019
@hramos hramos closed this as completed Mar 19, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants