Skip to content

fix(types): accept accessibility props on MenuView - #1272

Open
psjostrom wants to merge 1 commit into
react-native-menu:masterfrom
psjostrom:accessibility-props-types
Open

psjostrom wants to merge 1 commit into
react-native-menu:masterfrom
psjostrom:accessibility-props-types

Conversation

@psjostrom

@psjostrom psjostrom commented Dec 4, 2026 •

Copy link
Copy Markdown

Overview

MenuView spreads its props onto the native view, and the native view takes View props (NativeProps extends ViewProps). So accessibilityLabel, accessibilityRole and accessible already work at runtime. MenuComponentProps just doesn't list them, so TypeScript rejects them unless you go through a spread or a cast.

This adds AccessibilityProps to MenuComponentProps and NativeMenuComponentProps. Types only, no runtime change.

Not sure if you'd rather take all of ViewProps here. I kept it to accessibility because that's what we need.

Test Plan

yarn typescript and yarn lint pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@psjostrom
psjostrom force-pushed the accessibility-props-types branch from be1cde0 to 7b28210 Compare December 4, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant