Skip to content

Commit 7ddc7eb

Browse files
committed
VA-523 Don't override video tabbing
1 parent ec396e9 commit 7ddc7eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scripts/h5p-multi-media-choice-option.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,15 @@ export class MultiMediaChoiceOption {
283283
firstFocusable.focus();
284284
event.preventDefault();
285285
}
286-
else if ( event.shiftKey ) /* shift + tab */ {
286+
else if (event.shiftKey) /* shift + tab */ {
287287
if (document.activeElement === firstFocusable) {
288288
lastFocusable.focus();
289289
event.preventDefault();
290290
}
291291
}
292292
else /* tab */ {
293-
if (document.activeElement === lastFocusable) {
293+
// Uploaded videos have their own tab handling
294+
if (document.activeElement === lastFocusable && lastFocusable.nodeName !== 'VIDEO') {
294295
firstFocusable.focus();
295296
event.preventDefault();
296297
}

0 commit comments

Comments
 (0)