From 9df5caf3c545a7a1c559c6561625d99154aa0603 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 21 Jan 2025 15:56:01 -0600 Subject: Update hashtag menu to use `Menu`, convert to native link for additional a11y and click handling (#7529) * Make tag a normal link on web * Replace old TagMenu with new RichTextTag component, expand and improve click utils * Clarify intents * Ensure we're passing down hint * ope * DRY --- src/components/Menu/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/components/Menu/index.tsx') diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 99fb2d127..9c970b051 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -47,7 +47,12 @@ export function Root({ return {children} } -export function Trigger({children, label, role = 'button'}: TriggerProps) { +export function Trigger({ + children, + label, + role = 'button', + hint, +}: TriggerProps) { const context = useMenuContext() const {state: focused, onIn: onFocus, onOut: onBlur} = useInteractionState() const { @@ -65,11 +70,13 @@ export function Trigger({children, label, role = 'button'}: TriggerProps) { pressed, }, props: { + ref: null, onPress: context.control.open, onFocus, onBlur, onPressIn, onPressOut, + accessibilityHint: hint, accessibilityLabel: label, accessibilityRole: role, }, -- cgit 1.4.1