react-native-menu / menu

UIMenu Component for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS: Breaks accessibility

jgillick opened this issue · comments

I'm having accessibility issues with this component. When using the Accessibility Inspector, it does not read the content of MenuView and only reads that there is a button there. In my case, it list the text "Hello" as the label and an indicator that a long-press action is enabled.

Screenshot 2024-01-03 at 1 45 57 PM

When using the voice over navigation buttons it skips over the text.

You can see in the node hierarchy (as voice over sees it), the nodes end at the MenuView:

Screenshot 2024-01-03 at 1 46 42 PM

This is the JSX that I've implemented:

<MenuView
  onPressAction={onLongPress}
  actions={longPressActions}
  shouldOpenOnLongPress={true}
  style={baseStyles.container}
>
  <View style={containerStyles} removeClippedSubviews={false} pointerEvents="auto">
    <Text style={baseStyles.text}>{message.content}</Text>
  </View>
</MenuView>
);