diff --git a/packages/react-native/Libraries/Image/ImageBackground.js b/packages/react-native/Libraries/Image/ImageBackground.js index 15e2243d98f2..47968f40ada4 100644 --- a/packages/react-native/Libraries/Image/ImageBackground.js +++ b/packages/react-native/Libraries/Image/ImageBackground.js @@ -75,6 +75,8 @@ class ImageBackground extends React.Component { imageStyle, imageRef, importantForAccessibility, + 'aria-hidden': ariaHidden, + accessibilityElementsHidden, ...props } = this.props; @@ -82,13 +84,17 @@ class ImageBackground extends React.Component { const flattenedStyle = flattenStyle(style); return ( {/* $FlowFixMe[incompatible-use] */} ', () => { ); }); }); + + describe('aria-hidden', () => { + it('is set on both the wrapper `View` and the inner `Image`', () => { + const root = Fantom.createRoot(); + + Fantom.runTask(() => { + root.render( + , + ); + }); + + expect( + root + .getRenderedOutput({props: ['importantForAccessibility']}) + .toJSX(), + ).toEqual( + + + , + ); + }); + }); }); describe('ref', () => {