facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.68k stars 24.16k forks source link

[0.69.2 android-only accessibility] 'accessible' not working #34266

Closed wuyue1019 closed 1 month ago

wuyue1019 commented 2 years ago

Description

'accessible' property not working on android.

Version

0.69.2

Output of npx react-native info

System: OS: macOS 12.4 CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Memory: 37.68 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 8.5.5 - /usr/local/bin/npm Watchman: Not Found Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 3.1 AI-173.4907809 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.2 => 0.69.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

1) Create an empty project 2) Add below code anywhere appropriate

<View accessible={true} accessibilityLabel={'three'}>
  <Text>one</Text>
  <Text>two</Text>
</View>

[Android-only] Expected: 'three' only for accessibility Got: 'one' and 'two' still focusable for accessibility

For now I have to add accessible={false} for both 'one' and 'two' as a workaround.

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


<View accessible={true} accessibilityLabel={'three'}>
  <Text>one</Text>
  <Text>two</Text>
</View>
wuyue1019 commented 2 years ago

BTW, my RN was updated from 0.59.8, and the performance for accessibility is quite much better in 0.69.2. Thanks dudes for the efforts.

cortinico commented 2 years ago

@blavalla is this something for you to track?

EdmundasR commented 1 year ago

have run into this issues on 0.69.3-0.69.5 and it seems the issue is gone on 0.70.0

paulosborne commented 1 year ago

We've encountered this in 0.69.6 and we're currently unable to upgrade to 0.70 due to an issue with one of our other dependencies so if this could be patched in v69 it would be appreciated.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

AvielYosef commented 1 year ago

I got the same issue, we upgrade to 0.70 and its gone

acrojas2 commented 9 months ago

I have a related issue. I have react-native 0.71.8 and still have the problem, accessible prop is not working. I set accessible false, but it still focusable with the hardware keyboard. The pseudo code is something like this:

<View accessible={false}>
 <Pressable ...props />
</View>

anyone can help me pliss??

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

react-native-bot commented 1 month ago

This issue was closed because it has been stalled for 7 days with no activity.