Skip to content

Commit

Permalink
[added] tabbable support for iframes
Browse files Browse the repository at this point in the history
Iframes are, just like a button, anchor or inputs, an interactive element that should be focusable in modal. For example I play youtube videos in modals. Keyboard users should be able to pause video (or trigger any other action) as well.
  • Loading branch information
jaksenko authored and diasbruno committed Dec 3, 2021
1 parent 28986ea commit 68af7ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/tabbable.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* http://api.jqueryui.com/category/ui-core/
*/

const tabbableNode = /input|select|textarea|button|object/;
const tabbableNode = /input|select|textarea|button|object|iframe/;

function hidesContents(element) {
const zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
Expand Down

0 comments on commit 68af7ec

Please sign in to comment.