Skip to content

Commit

Permalink
EBR-42: add keyboard key event for downloading files
Browse files Browse the repository at this point in the history
  • Loading branch information
915-Misan-Teodora committed Apr 5, 2024
1 parent 05eaebc commit 6836b12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/JobOutputFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
)}
</>
Expand Down
5 changes: 5 additions & 0 deletions style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 6836b12

Please sign in to comment.