Skip to content

Commit

Permalink
fixes a11y with tabIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelg16 committed May 17, 2024
1 parent bb85f74 commit 429ad49
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,13 @@
this.errorLoading = true;
this.reportLoadingError(err);
});
// sets the iframe to be the first element in the tab order
// fixes accessibility for users using tabs to navigate the page
this.rendition.on(EVENTS.RENDITION.RENDERED, (_, view) => {
view.iframe.tabIndex = 1;
view.focus();
});
});
},
beforeDestroy() {
Expand Down

0 comments on commit 429ad49

Please sign in to comment.