Skip to content

[ImageBackground] Forward aria-hidden and accessibilityElementsHidden to wrapper View - #59808

Open
GautamKumarOffical wants to merge 1 commit into
react:mainfrom
GautamKumarOffical:fix/image-background-aria-hidden
Open

GautamKumarOffical wants to merge 1 commit into
react:mainfrom
GautamKumarOffical:fix/image-background-aria-hidden

Conversation

@GautamKumarOffical

Copy link
Copy Markdown

Summary:

Fixes #59746.

ImageBackground renders its children inside a wrapper View alongside the Image component. Previously, importantForAccessibility was forwarded to both the wrapper View and the inner Image, but aria-hidden and accessibilityElementsHidden were only passed along via ...props to the inner Image. Consequently, setting aria-hidden={true} on an ImageBackground left its rendered children exposed in the accessibility tree on both iOS and Android.

This change explicitly forwards aria-hidden and accessibilityElementsHidden to the wrapper View (in addition to the inner Image), ensuring children are correctly hidden from accessibility services.

Changelog:

[GENERAL] [FIXED] - Forward aria-hidden and accessibilityElementsHidden to ImageBackground wrapper View

Test Plan:

  • Added unit test in packages/react-native/Libraries/Image/__tests__/ImageBackground-itest.js asserting that aria-hidden is propagated to both the wrapper View and the inner Image.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 5, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageBackground with aria-hidden leaves its children in the accessibility tree

1 participant