diff options
author | Cynthia <cynthia@cynthia.dev> | 2024-11-03 18:18:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-03 09:18:27 -0800 |
commit | ac9d910e1e77c559eff8b32cd8412335f41074f1 (patch) | |
tree | 9963b37b460fb3b8e585268bdfb78734c80d4bc4 /src/components/Menu/types.ts | |
parent | c580f20b5311914c3ecdd3a84f7ae13f8881f3a7 (diff) | |
download | voidsky-ac9d910e1e77c559eff8b32cd8412335f41074f1.tar.zst |
fix(a11y): avoid plain `div`s as button or tabs (#6084)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/components/Menu/types.ts')
-rw-r--r-- | src/components/Menu/types.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/Menu/types.ts b/src/components/Menu/types.ts index 2f7aea5de..44171d42c 100644 --- a/src/components/Menu/types.ts +++ b/src/components/Menu/types.ts @@ -1,6 +1,7 @@ import React from 'react' import { AccessibilityProps, + AccessibilityRole, GestureResponderEvent, PressableProps, } from 'react-native' @@ -36,6 +37,7 @@ export type RadixPassThroughTriggerProps = { export type TriggerProps = { children(props: TriggerChildProps): React.ReactNode label: string + role?: AccessibilityRole } export type TriggerChildProps = | { @@ -63,6 +65,7 @@ export type TriggerChildProps = onPressIn: () => void onPressOut: () => void accessibilityLabel: string + accessibilityRole: AccessibilityRole } } | { @@ -83,6 +86,7 @@ export type TriggerChildProps = onMouseEnter: () => void onMouseLeave: () => void accessibilityLabel: string + accessibilityRole: AccessibilityRole } } |