-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Open
Labels
AccessibilityNeeds: Triage 🔍Platform: AndroidAndroid applications.Android applications.Platform: iOSiOS applications.iOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
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
- open xCode and accessibility inspector (xCode -> Open Developer Tool -> Accessibility Inspector)
- run your app
- 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
mateoguzmana and mrpoodestump
Metadata
Metadata
Assignees
Labels
AccessibilityNeeds: Triage 🔍Platform: AndroidAndroid applications.Android applications.Platform: iOSiOS applications.iOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.