From 6c9372712f1b43c7ffa4bbe5c6da621a47bf2519 Mon Sep 17 00:00:00 2001 From: abdulbasithqb Date: Tue, 28 Nov 2023 17:52:34 +0530 Subject: [PATCH] fix: accessibility in Link component --- src/components/primitives/Link/index.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/primitives/Link/index.tsx b/src/components/primitives/Link/index.tsx index 5a71d3572..1665bad8c 100644 --- a/src/components/primitives/Link/index.tsx +++ b/src/components/primitives/Link/index.tsx @@ -19,6 +19,8 @@ const Link = ({ isHovered: isHoveredProp, ...props }: ILinkProps, ref: any) => { _text, href, onPress, + accessibilityLabel, + accessibilityHint, isExternal, ...resolvedProps } = usePropsResolution('Link', props, { @@ -53,6 +55,8 @@ const Link = ({ isHovered: isHoveredProp, ...props }: ILinkProps, ref: any) => { _text={linkTextProps} ref={mergeRefs([ref, _ref])} flexDirection="row" + accessibilityLabel={accessibilityLabel} + accessibilityHint={accessibilityHint} > {children} @@ -65,7 +69,12 @@ const Link = ({ isHovered: isHoveredProp, ...props }: ILinkProps, ref: any) => { > {React.Children.map(children, (child) => typeof child === 'string' || typeof child === 'number' ? ( - + {child} ) : (