Skip to content

Commit 5954391

Browse files
fix(ui): make LinkWithArrow behave like accessible button for modal open
1 parent b33a5a4 commit 5954391

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/site/components/Downloads/DownloadReleasesTable/DetailsButton.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ const DetailsButton: FC<DetailsButtonProps> = ({ versionData }) => {
2020
return (
2121
<LinkWithArrow
2222
className="cursor-pointer"
23+
role="button"
24+
tabIndex={0}
25+
aria-label={t('details')}
26+
onKeyDown={e => {
27+
if (e.key === 'Enter' || e.key === ' ') {
28+
e.preventDefault();
29+
openModal(versionData);
30+
}
31+
}}
2332
onClick={() => openModal(versionData)}
2433
>
2534
{t('details')}

0 commit comments

Comments
 (0)