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

onAccessibilityTap not working for android #34136

Closed
shannon-voda opened this issue Jul 6, 2022 · 9 comments
Closed

onAccessibilityTap not working for android #34136

shannon-voda opened this issue Jul 6, 2022 · 9 comments
Labels
Needs: Triage 🔍 Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@shannon-voda
Copy link

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>
@Droidking18
Copy link

Same issue here

@s-mirsky
Copy link

I also have this issue.

@shannon-voda
Copy link
Author

Have recently updated to latest RN Version 0.69.3 and still encounter this issue.

@YanislavSpaceIQ
Copy link

I'm experiencing the same issue

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 18, 2023
@BasixKOR
Copy link

BasixKOR commented Jun 5, 2023

It seems like the property onAccessibilityTap is straight-up unimplemented on Android, as I couldn't any code referencing it on the Android code.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 16, 2024
@react-native-bot
Copy link
Collaborator

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 react-native-bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 14, 2024
@react-native-bot
Copy link
Collaborator

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

@react-native-bot react-native-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
@Aksana-Tsishchanka
Copy link

I have the same issue with RN 0.72.6. Here is my code:

const a11yActions = [
{ name: 'add', label: 'Add the library' },
{ name: 'more', label: 'Open menu' },
]

<Pressable
accessibilityActions={a11yActions}
onAccessibilityTap={() => {
setBg('yellow')
if (event.nativeEvent.actionName === 'add') {
firstButtonProps.onPress(event)
}

    if (event.nativeEvent.actionName === 'more') {
      secondButtonProps?.onPress(event)
    }
  }}
>

{...}

On Android when a screen reader is turn on, the bottom sheet with the defined actions appears but activation 'add' or 'more' does not call a provided callback.

Please reopen and fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

7 participants