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,
Pressable,
Text,
type View,
View,
} from 'react-native'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
@@ -102,7 +102,13 @@ function FocusTrap({children}: {children: ReactNode}) {
}}>
<Noop />
</Pressable>
{decoratedChildren}
<View
/**
* This property traps focus effectively on iOS, but not on Android.
*/
accessibilityViewIsModal>
{decoratedChildren}
</View>
<Pressable
accessibilityLabel={_(
msg`You've reached the end of the active content.`,
@@ -109,7 +109,6 @@ export function Overlay({
<FocusScope>
<View
accessibilityViewIsModal
accessible={isAndroid}
role="dialog"
aria-role="dialog"