diff options
Diffstat (limited to 'core/misc/jquery.tabbable.shim.js')
-rw-r--r-- | core/misc/jquery.tabbable.shim.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/misc/jquery.tabbable.shim.js b/core/misc/jquery.tabbable.shim.js new file mode 100644 index 000000000000..dd95d9bf1bc0 --- /dev/null +++ b/core/misc/jquery.tabbable.shim.js @@ -0,0 +1,23 @@ +/** +* DO NOT EDIT THIS FILE. +* See the following change record for more information, +* https://www.drupal.org/node/2815083 +* @preserve +**/ + +(function ($, Drupal, _ref) { + var isTabbable = _ref.isTabbable; + $.extend($.expr[':'], { + tabbable: function tabbable(element) { + if (element.tagName === 'SUMMARY' || element.tagName === 'DETAILS') { + var tabIndex = element.getAttribute('tabIndex'); + + if (tabIndex === null || tabIndex < 0) { + return false; + } + } + + return isTabbable(element); + } + }); +})(jQuery, Drupal, window.tabbable);
\ No newline at end of file |