diff --git a/packages/react-native/Libraries/Text/Text.js b/packages/react-native/Libraries/Text/Text.js index 8885d64165da..6c4b28d0caf0 100644 --- a/packages/react-native/Libraries/Text/Text.js +++ b/packages/react-native/Libraries/Text/Text.js @@ -60,6 +60,7 @@ const TextImpl: component( 'aria-expanded': ariaExpanded, 'aria-hidden': ariaHidden, 'aria-label': ariaLabel, + 'aria-live': ariaLive, 'aria-selected': ariaSelected, children, ellipsizeMode, @@ -140,6 +141,11 @@ const TextImpl: component( } } + if (ariaLive !== undefined) { + processedProps.accessibilityLiveRegion = + ariaLive === 'off' ? 'none' : ariaLive; + } + const _accessible = Platform.select({ ios: accessible !== false, android: diff --git a/packages/react-native/Libraries/Text/__tests__/Text-itest.js b/packages/react-native/Libraries/Text/__tests__/Text-itest.js index 780b9b3c7a14..f2126b41af5d 100644 --- a/packages/react-native/Libraries/Text/__tests__/Text-itest.js +++ b/packages/react-native/Libraries/Text/__tests__/Text-itest.js @@ -633,6 +633,22 @@ describe('', () => { ); }); }); + + describe('aria-live', () => { + it('is mapped to accessibilityLiveRegion', () => { + const root = Fantom.createRoot(); + Fantom.runTask(() => { + root.render({TEST_TEXT}); + }); + expect( + root.getRenderedOutput({props: ['accessibilityLiveRegion']}).toJSX(), + ).toEqual( + + {TEST_TEXT} + , + ); + }); + }); }); describe('ref', () => {