From 6836b127ce81016f88202df9a866a65cac4763cd Mon Sep 17 00:00:00 2001 From: "RIO\\teodora.misan" Date: Fri, 5 Apr 2024 13:29:02 +0300 Subject: [PATCH] EBR-42: add keyboard key event for downloading files --- src/components/JobOutputFiles.tsx | 6 ++++++ style/base.css | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/components/JobOutputFiles.tsx b/src/components/JobOutputFiles.tsx index b949184..b39a4b3 100644 --- a/src/components/JobOutputFiles.tsx +++ b/src/components/JobOutputFiles.tsx @@ -253,6 +253,12 @@ export const JobOutput = (props: Types.JobOutputProps): JSX.Element => { data-testid={'download-file'} className={'fa fa-download clickableIcon'} onClick={() => downloadToCurrentPath(output)} + onKeyDown={event => { + if (event.key === 'Enter') { + downloadToCurrentPath(output); + } + }} + tabIndex={0} /> )} diff --git a/style/base.css b/style/base.css index 5337474..3314741 100644 --- a/style/base.css +++ b/style/base.css @@ -307,6 +307,11 @@ button[disabled]:hover { cursor: pointer; } +.clickableIcon:focus { + outline: #2b2b2c solid 2px; + outline-offset: 2px; +} + i { color: var(--jp-content-font-color2); } \ No newline at end of file