Move a11y prop into FocusScope

This commit is contained in:
Eric Bailey
2025-08-05 16:04:54 -05:00
parent b8cfb2d0af
commit 43ef87b852
2 changed files with 8 additions and 3 deletions
+8 -2
View File
@@ -14,7 +14,7 @@ import {
findNodeHandle, findNodeHandle,
Pressable, Pressable,
Text, Text,
type View, View,
} from 'react-native' } from 'react-native'
import {msg} from '@lingui/macro' import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
@@ -102,7 +102,13 @@ function FocusTrap({children}: {children: ReactNode}) {
}}> }}>
<Noop /> <Noop />
</Pressable> </Pressable>
{decoratedChildren} <View
/**
* This property traps focus effectively on iOS, but not on Android.
*/
accessibilityViewIsModal>
{decoratedChildren}
</View>
<Pressable <Pressable
accessibilityLabel={_( accessibilityLabel={_(
msg`You've reached the end of the active content.`, msg`You've reached the end of the active content.`,
@@ -109,7 +109,6 @@ export function Overlay({
<FocusScope> <FocusScope>
<View <View
accessibilityViewIsModal
accessible={isAndroid} accessible={isAndroid}
role="dialog" role="dialog"
aria-role="dialog" aria-role="dialog"