From fd528ec95905782c72bc00bafed6c3fac2fbcb9e Mon Sep 17 00:00:00 2001 From: lianbenjamin <79077248+lianbenjamin@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:30:45 +0200 Subject: [PATCH] fix(FEC-14177): a11y fixes --- src/components/advanced-audio-desc/advanced-audio-desc.tsx | 1 + src/components/picture-in-picture/picture-in-picture.tsx | 1 + src/components/vr-stereo/vr-stereo.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/src/components/advanced-audio-desc/advanced-audio-desc.tsx b/src/components/advanced-audio-desc/advanced-audio-desc.tsx index 6a38a247..b9947edf 100644 --- a/src/components/advanced-audio-desc/advanced-audio-desc.tsx +++ b/src/components/advanced-audio-desc/advanced-audio-desc.tsx @@ -97,6 +97,7 @@ class AdvancedAudioDesc extends Component implements IconComponent { */ onKeyDown = (e: KeyboardEvent): void => { if ([KeyCode.Enter, KeyCode.Space].includes(e.code)) { + e.preventDefault(); this.onClick(); } }; diff --git a/src/components/picture-in-picture/picture-in-picture.tsx b/src/components/picture-in-picture/picture-in-picture.tsx index 83ad71f1..ff844aca 100644 --- a/src/components/picture-in-picture/picture-in-picture.tsx +++ b/src/components/picture-in-picture/picture-in-picture.tsx @@ -109,6 +109,7 @@ class PictureInPicture extends Component implements IconComponent { */ onKeyDown = (e: KeyboardEvent): void => { if ([KeyCode.Enter, KeyCode.Space].includes(e.code)) { + e.preventDefault(); this.togglePip(); this.props.updatePlayerHoverState(true); } diff --git a/src/components/vr-stereo/vr-stereo.tsx b/src/components/vr-stereo/vr-stereo.tsx index 26336343..5110e68e 100644 --- a/src/components/vr-stereo/vr-stereo.tsx +++ b/src/components/vr-stereo/vr-stereo.tsx @@ -104,6 +104,7 @@ class VrStereo extends Component implements IconComponent { */ onKeyDown = (e: KeyboardEvent): void => { if ([KeyCode.Enter, KeyCode.Space].includes(e.code)) { + e.preventDefault(); this.onClick(); } };