Skip to content

Commit dd988fc

Browse files
committed
fix(a11y): anchors should not be set with a11y role "link" when empty href
1 parent 833f930 commit dd988fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/render-html/src/renderers/ARenderer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function useAnchorOnLinkPress(
1717
const shouldHandleLinkPress =
1818
tnode.tagName === 'a' &&
1919
typeof normalizedHref === 'string' &&
20+
href.length > 0 &&
2021
typeof onPress === 'function';
2122
return shouldHandleLinkPress
2223
? (e: GestureResponderEvent) =>

0 commit comments

Comments
 (0)