Skip to content

Commit

Permalink
fix(a11y): anchors should not be set with a11y role "link" when empty…
Browse files Browse the repository at this point in the history
… href
  • Loading branch information
jsamr committed Sep 11, 2021
1 parent 833f930 commit dd988fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/render-html/src/renderers/ARenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function useAnchorOnLinkPress(
const shouldHandleLinkPress =
tnode.tagName === 'a' &&
typeof normalizedHref === 'string' &&
href.length > 0 &&
typeof onPress === 'function';
return shouldHandleLinkPress
? (e: GestureResponderEvent) =>
Expand Down

0 comments on commit dd988fc

Please sign in to comment.