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

iOS Accessibility Value Out of Sync #35774

Open
samcarlinone opened this issue Jan 4, 2023 · 4 comments
Open

iOS Accessibility Value Out of Sync #35774

samcarlinone opened this issue Jan 4, 2023 · 4 comments
Labels

Comments

@samcarlinone
Copy link

samcarlinone commented Jan 4, 2023

Description

On iOS it seems that after an accessibility action is triggered the value of accessibility value is read an arbitrary amount of time later. This can lead to VoiceOver reading the previous value again rather than the new value.

This means that sometimes the value will be read correctly, depending on how quickly react native renders the updated accessibility action.

However in my moderately complex RN project I was unable to reliably get everything rendering quickly enough. Even when Flipper said the component in question was rendering in a few ms the bug would still sometimes occur (about 1 in 20 actions).

Note: On Android, TalkBack waits any length of time before reading the updated value. Even an artificial of delay of 500ms will still be read correctly.

Version

0.68.5

Output of npx react-native info

System:
OS: macOS 12.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 37.62 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 2022.06.06.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 30, 31
Build Tools: 30.0.2, 31.0.0, 33.0.1
System Images: android-24 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 18.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.5 => 0.68.5
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Accessible components with the following properties:

  • accessibleRole="adjustable"
  • accessibilityActions for increment and decrement
  • accessibilityValue with text property set

In an app where the component is not guaranteed to render quickly enough.

Running with VoiceOver on iOS (Reading speed didn't seem to change the issue)

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

https://snack.expo.dev/@scarlin/ios-accessibility-value-bug-demo

@samcarlinone
Copy link
Author

This issue is still happening on iOS with React Native version 0.71.7

Also noticed it occurring on a switch component, where the announced checked state after toggling a component is incorrect.

@kseverinsen
Copy link

This issue is still happening with v0.72.6

@Magnus-V
Copy link

Magnus-V commented Jan 24, 2024

This issue is still happening with v0.73.2.

A change in a checked value using accessibilityState does not help and previous value is being read. On an older android device it works perfectly so could be a race-condition error or iOS error.

@davor-bauk-sh
Copy link

davor-bauk-sh commented Apr 3, 2024

I'm seeing similar behavior in accessibilityRole="adjustable" components. When updating the accessibilityValue's now property from eg. 1 to 2, iOS VoiceOver incorrectly announces the new state as "one".

Similarly, when modifying the checked property in components' accessibilityState, iOS VoiceOver incorrectly announces the previous value (eg. when checked is changed from false to true, VoiceOver announces "unchecked").
I'm seeing this behavior with both custom checkbox components as well as with React Native's Switch component.

I'm currently running RN v0.73.6 (Expo SDK 50)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants