Content-Length: 214240 | pFad | http://github.com/facebook/react-native/issues/48638

2E Accessibility Actions Not Triggering on FlatList Carousel (iOS and Android) · Issue #48638 · facebook/react-native · GitHub
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

Accessibility Actions Not Triggering on FlatList Carousel (iOS and Android) #48638

Open
LucasSan opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@LucasSan
Copy link

Description

I’m trying to add accessibility to a FlatList carousel in my React Native app by using Accessibility Actions. I’ve added both the actions and the corresponding function to handle them. However, when I test it in the simulator (both Xcode for iOS and Android Studio), nothing happens when I attempt to trigger the actions.

Here’s a snippet of what I’ve done:

export default function App() {
  const onAccessibilityAction = (event: any) => {
    console.log("event: ", event);
  };
  const renderItem = ({ item }) => {
    return (
      <Text>{item.id}</Text>
    );
  };
  const data = () => {
    const result = []
    for (let i = 0; i < 50; i++) {
      result.push({ id: i })
    }
    return result;
  }

  return (
         <FlatList
          horizontal={false}
          focusable={true}
          accessibilityActions={[
            { name: "increment" },
            { name: "decrement" },
          ]}
          onAccessibilityAction={onAccessibilityAction}
          accessibilityRole="adjustable"
          renderItem={renderItem}
          data={data()}
        />
  );
}

Steps to reproduce

iOS

  1. open xCode and accessibility inspector (xCode -> Open Developer Tool -> Accessibility Inspector)
  2. run your app
  3. navigate to the list previously created using the accessibility inspector, and try to perform an action of increment or decrement

React Native Version

0.76.6

Affected Platforms

Runtime - Android, Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.2
  CPU: (8) arm64 Apple M1 Pro
  Memory: 2.93 GB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.14.0
    path: ~/.nvm/versions/node/v20.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.14.0/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v20.14.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12483815
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/lucasgermano/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.1.3
  react:
    installed: 18.3.1
    wanted: ^18.2.0
  react-native:
    installed: 0.76.6
    wanted: ^0.76.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

-

Reproducer

https://snack.expo.dev/WQaHKjYSd8bTv_BVB_r67

Screenshots and Videos

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/issues/48638

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy