react-native: Error while updating property 'accessibilityRole' of a view managed by:RCTView

Hi I am getting following error. PFA

Error while updating property ‘accessibilityRole’ of a view managed by:RCTView null Invalid accessibility role value:tab

React Native version: React Native Environment Info: System: OS: macOS 10.15.2 CPU: (4) x64 Intel® Core™ i5-5350U CPU @ 1.80GHz Memory: 53.47 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.6010548 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: ^0.59.10 => 0.59.10

Screenshot 2020-01-28 at 11 15 18 AM

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Hi everyone, I figured out with temporary solution actually. Here what is:

I set react-native-tab-view version 2.7.0 with hardcoded in package.json. Not “^2.7.0”, because if you set like this it’s downloading 2.13.0 from npm, which had actual problem.

react-native-gesture-handler version 1.3 and react-native-reanimated version 1.2 which re compatible with 2.7.0 because it’s latest version before Android X version as this 3rd party libraries. So problem basically fixed.

By the way if we talk about why this error happening. It’s because of in the latest version of react-native-tab-view TabHeader components are inheriting from TouchableFeedback and setting accessibilityRole as “tab” but none valid role in android native side. So this error happening. I can’t go deep in library and fix it cause I don’t had time that much currently. If any of contributors from this project tracking this issue. They can easily fix.

Best wishes.

+1 same problem caused by createMaterialTopTabNavigator

Thanks @yadigarbz, that’s fixed my problem. For beginnner users, remember you must run npm install after change the packages version on package.json.

It’s really strange. It’s working on this snack https://snack.expo.io/@jessebrightman/tabs-error but same code is not working on my project. I am verifying dependencies and will report back.

Same here. I just added react-native-gesture-handler:1.3.0 react-native-reanimated:1.2.0 and upgrade react-native-tab-view to 2.7.0 and this happen.

+1

Can you provide an example using Snack?

Hello, same here! OS: Android React Native: 0.59.10