Skip to content

onAccessibilityTap not working for android #34136

Closed as not planned
Closed as not planned
@shannon-voda

Description

@shannon-voda

Description

onAccessibilityTap on a View works on iOS but does not work on Android.

image

Docs do not mention only working for iOS

Version

0.66.2

Output of npx react-native info

System:
OS: macOS 12.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.88 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 7.7.6 - ~/.nvm/versions/node/v15.14.0/bin/npm
Watchman: 2021.09.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /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:
API Levels: 29, 30, 31
Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0
System Images: android-21 | ARM EABI v7a, android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_321 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.2 => 0.66.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Activate talkback
Tap on component with action
Double tap to activate action
Action will not activate

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

<View
        style={styles(this.context.theme).logoRow}
        accessible
        onAccessibilityTap={onPress}
        accessibilityRole='button'
        accessibilityHint={I18n.t('accessibility.dashboard.logoAndNameHint')}
      >
        <View style={{ flex: 0.3 }}>
          <Image style={styles(this.context.theme).logo} source={Images.redLogo} accessibilityIgnoresInvertColors />
        </View>
        {selectedServiceId && (
          <View style={{ flex: 0.7 }}>
            <MVAServiceName serviceId={selectedServiceId} onPress={onPress} />
          </View>
        )}
      </View>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍Platform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions