From dd988fcc9c9f03aecb1bc20f904cf19e0c5f6ff6 Mon Sep 17 00:00:00 2001 From: "Jules Sam. Randolph" Date: Sat, 11 Sep 2021 14:13:48 -0300 Subject: [PATCH] fix(a11y): anchors should not be set with a11y role "link" when empty href --- packages/render-html/src/renderers/ARenderer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/render-html/src/renderers/ARenderer.tsx b/packages/render-html/src/renderers/ARenderer.tsx index 3169bd8fc..91a564a6e 100644 --- a/packages/render-html/src/renderers/ARenderer.tsx +++ b/packages/render-html/src/renderers/ARenderer.tsx @@ -17,6 +17,7 @@ function useAnchorOnLinkPress( const shouldHandleLinkPress = tnode.tagName === 'a' && typeof normalizedHref === 'string' && + href.length > 0 && typeof onPress === 'function'; return shouldHandleLinkPress ? (e: GestureResponderEvent) =>