diff options
author | Hailey <me@haileyok.com> | 2024-05-20 11:36:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 11:36:08 -0700 |
commit | 492216a584d8feef674dab898466dbb80af2a4f3 (patch) | |
tree | 6fad284faf1d5be400f286550bb5832ccf6cf047 /src/components/dms/ActionsWrapper.tsx | |
parent | 24f8794d4db517540a2151440deb51bba171f89a (diff) | |
download | voidsky-492216a584d8feef674dab898466dbb80af2a4f3.tar.zst |
[🐴] Screenreader accessibility actions for individual chat items (#4116)
* add accessibility tap to messages * add a label for the accessibility action * improve accessibility actions on chat list items * adjust types * more consistent wording * make the strings localizable
Diffstat (limited to 'src/components/dms/ActionsWrapper.tsx')
-rw-r--r-- | src/components/dms/ActionsWrapper.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/dms/ActionsWrapper.tsx b/src/components/dms/ActionsWrapper.tsx index a349c3cfa..1bb57ff90 100644 --- a/src/components/dms/ActionsWrapper.tsx +++ b/src/components/dms/ActionsWrapper.tsx @@ -9,6 +9,8 @@ import Animated, { withTiming, } from 'react-native-reanimated' import {ChatBskyConvoDefs} from '@atproto/api' +import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' import {HITSLOP_10} from 'lib/constants' import {useHaptics} from 'lib/haptics' @@ -25,6 +27,7 @@ export function ActionsWrapper({ isFromSelf: boolean children: React.ReactNode }) { + const {_} = useLingui() const playHaptic = useHaptics() const menuControl = useMenuControl() @@ -78,7 +81,12 @@ export function ActionsWrapper({ }, isFromSelf ? a.self_end : a.self_start, animatedStyle, - ]}> + ]} + accessible={true} + accessibilityActions={[ + {name: 'activate', label: _(msg`Open message options`)}, + ]} + onAccessibilityAction={open}> {children} <MessageMenu message={message} control={menuControl} /> </Animated.View> |