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

[Android] [Talkback] [Accessible] Cannot select other components on screen after moving the Bottomsheet #3046

Open
namtran-axonvibemta opened this issue Aug 14, 2024 · 4 comments
Labels
Missing info Missing repro Platform: Android This issue is specific to Android

Comments

@namtran-axonvibemta
Copy link

Description

[Android] [Talkback] [Accessible] Cannot select other components on screen after moving

Steps to reproduce

  1. Enable Talkback on Android then move to the Bottomsheet
  2. Try to move to full screen or even just a little move only then cannot tap any elements on screen anymore.
  3. User can move the Bottomsheet back to mini or medium mode but cannot tap any elements on screen (even elements inside the bottomsheet).

Snack or a link to a repository

""

Gesture Handler version

2.18.1

React Native version

0.74

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@namtran-axonvibemta
Copy link
Author

It seems wrong in implementation of Hover feature that make this conflicted with scroll event.
16a266e

After editing the override function then Talkback now can work again after moving bottomsheet.
node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt

override fun dispatchGenericMotionEvent(event: MotionEvent) =
    super.dispatchGenericMotionEvent(event)

Copy link

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@github-actions github-actions bot added Missing info Platform: Android This issue is specific to Android labels Aug 14, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@coado
Copy link
Contributor

coado commented Aug 27, 2024

Hey @namtran-axonvibemta, could you provide some repro for this? I have tried using bottom sheet with some Pressable in the background and with talkback turned on. It seems to work on react native 0.75. I've tested on Xiaomi Redmi Note 9.

import React, {useRef, useCallback} from 'react';
import {SafeAreaView, StyleSheet, Text, Pressable} from 'react-native';

import BottomSheet, {BottomSheetView} from '@gorhom/bottom-sheet';

import {GestureHandlerRootView} from 'react-native-gesture-handler';

function App(): React.JSX.Element {
  const [counter, setCounter] = React.useState(0);
  const bottomSheetRef = useRef<BottomSheet>(null);
  const handleSheetChanges = useCallback((index: number) => {
    console.log('handleSheetChanges', index);
  }, []);

  const handleClick = () => {
    setCounter(counter + 1);
  };

  return (
    <GestureHandlerRootView style={{flex: 1}}>
      <SafeAreaView style={styles.container}>
        <Pressable onPress={handleClick} style={styles.pressable}>
          <Text style={styles.pressableText}>Click me {counter}</Text>
        </Pressable>
        <BottomSheet
          snapPoints={['20%', '95%']}
          ref={bottomSheetRef}
          onChange={handleSheetChanges}>
          <BottomSheetView style={styles.contentContainer}>
            <Text>Awesome 🎉</Text>
          </BottomSheetView>
        </BottomSheet>
      </SafeAreaView>
    </GestureHandlerRootView>
  );
}

const styles = StyleSheet.create({
  contentContainer: {
    flex: 1,
    alignItems: 'center',
    backgroundColor: 'white',
  },
  container: {
    flex: 1,
    padding: 24,
    backgroundColor: 'grey',
  },
  pressable: {
    backgroundColor: 'cyan',
    padding: 10,
    justifyContent: 'center',
    alignItems: 'center',
  },
  pressableText: {
    color: 'black',
    fontSize: 18,
    fontWeight: 'bold',
  },
});

export default App;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info Missing repro Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

2 participants