Skip to content

Commit

Permalink
[A11y] - Switching image using the Enter key
Browse files Browse the repository at this point in the history
Add the ability to switch the displayed image in the gallery by pressing the Enter key on one of the thumbnails.
  • Loading branch information
Galpittel committed Mar 13, 2024
1 parent 345afbe commit 67ca751
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ class NavigationPanel extends React.Component {
style={itemStyle}
onClick={() => this.scrollToThumbnail(idx)}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter') {
this.scrollToThumbnail(idx);
}
}}
>
{thumbnailItem.type === 'video' &&
options[optionsMap.behaviourParams.item.video.enableThumbnailsPlayButton] && (
Expand Down

0 comments on commit 67ca751

Please sign in to comment.