Skip to content

Commit

Permalink
Link: role tab for aria-current === section (#3897)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertCarreras authored Nov 28, 2024
1 parent f646756 commit 0934232
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gestalt/src/Link/InternalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ const InternalLinkWithForwardRef = forwardRef<HTMLAnchorElement, Props>(function
...(target === 'blank' ? ['noopener', 'noreferrer'] : []),
...(rel === 'nofollow' ? ['nofollow'] : []),
].join(' ')}
role={accessibilityCurrent && accessibilityCurrent === 'section' ? 'tab' : undefined}
tabIndex={disabled ? undefined : tabIndex}
{...(tapStyle === 'compress' && compressStyle && !disabled ? { style: compressStyle } : {})}
target={target ? `_${target}` : undefined}
Expand Down

0 comments on commit 0934232

Please sign in to comment.