Move a11y prop into FocusScope
This commit is contained in:
@@ -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>
|
||||||
|
<View
|
||||||
|
/**
|
||||||
|
* This property traps focus effectively on iOS, but not on Android.
|
||||||
|
*/
|
||||||
|
accessibilityViewIsModal>
|
||||||
{decoratedChildren}
|
{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"
|
||||||
|
|||||||
Reference in New Issue
Block a user