diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-03-06 19:38:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 19:38:48 +0900 |
commit | f3db23a3b14e9444cb499c727b9d62c414e5a840 (patch) | |
tree | 4b9f39447c7c53d2baf3dd4029b2f8ea30e3c9b1 /src/view/shell/index.tsx | |
parent | 0c6a82062f9c9c47338fe50f0ef37a1c068939c2 (diff) | |
parent | eb298d2e60a0ddf26ebaf8f27373418bbf7769e3 (diff) | |
download | voidsky-f3db23a3b14e9444cb499c727b9d62c414e5a840.tar.zst |
Merge branch 'bluesky-social:main' into patch-3
Diffstat (limited to 'src/view/shell/index.tsx')
-rw-r--r-- | src/view/shell/index.tsx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index d895d8851..bdba79174 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -30,6 +30,7 @@ import {useCloseAnyActiveElement} from '#/state/util' import * as notifications from 'lib/notifications/notifications' import {Outlet as PortalOutlet} from '#/components/Portal' import {MutedWordsDialog} from '#/components/dialogs/MutedWords' +import {useDialogStateContext} from '#/state/dialogs' function ShellInner() { const isDrawerOpen = useIsDrawerOpen() @@ -55,6 +56,7 @@ function ShellInner() { const closeAnyActiveElement = useCloseAnyActiveElement() // start undefined const currentAccountDid = React.useRef<string | undefined>(undefined) + const {openDialogs} = useDialogStateContext() React.useEffect(() => { let listener = {remove() {}} @@ -78,9 +80,21 @@ function ShellInner() { } }, [currentAccount]) + /** + * The counterpart to `accessibilityViewIsModal` for Android. This property + * applies to the parent of all non-modal views, and prevents TalkBack from + * navigating within content beneath an open dialog. + * + * @see https://reactnative.dev/docs/accessibility#importantforaccessibility-android + */ + const importantForAccessibility = + openDialogs.length > 0 ? 'no-hide-descendants' : undefined + return ( <> - <View style={containerPadding}> + <View + style={containerPadding} + importantForAccessibility={importantForAccessibility}> <ErrorBoundary> <Drawer renderDrawerContent={renderDrawerContent} |