From ac9d910e1e77c559eff8b32cd8412335f41074f1 Mon Sep 17 00:00:00 2001
From: Cynthia <cynthia@cynthia.dev>
Date: Sun, 3 Nov 2024 18:18:27 +0100
Subject: fix(a11y): avoid plain `div`s as button or tabs (#6084)

Co-authored-by: Hailey <me@haileyok.com>
---
 src/components/Menu/index.web.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/components/Menu/index.web.tsx')

diff --git a/src/components/Menu/index.web.tsx b/src/components/Menu/index.web.tsx
index 47c3c63ad..d68dcba51 100644
--- a/src/components/Menu/index.web.tsx
+++ b/src/components/Menu/index.web.tsx
@@ -111,7 +111,7 @@ const RadixTriggerPassThrough = React.forwardRef(
 )
 RadixTriggerPassThrough.displayName = 'RadixTriggerPassThrough'
 
-export function Trigger({children, label}: TriggerProps) {
+export function Trigger({children, label, role = 'button'}: TriggerProps) {
   const {control} = React.useContext(Context)
   const {
     state: hovered,
@@ -155,6 +155,7 @@ export function Trigger({children, label}: TriggerProps) {
               onMouseEnter,
               onMouseLeave,
               accessibilityLabel: label,
+              accessibilityRole: role,
             },
           })
         }
-- 
cgit 1.4.1

