diff options
author | Alex Pott <alex.a.pott@googlemail.com> | 2021-03-05 12:54:27 +0000 |
---|---|---|
committer | Alex Pott <alex.a.pott@googlemail.com> | 2021-03-05 12:54:27 +0000 |
commit | daf10a069572b2fb1d5ebcdf7cdb8400878e965d (patch) | |
tree | 6166d96e36c2ca16a94426e00916659ed29f9ce3 /core/misc/jquery.tabbable.shim.js | |
parent | cbccba94b6b4baea99056d7a5179cc1f0e3cb960 (diff) | |
download | drupal-daf10a069572b2fb1d5ebcdf7cdb8400878e965d.tar.gz drupal-daf10a069572b2fb1d5ebcdf7cdb8400878e965d.zip |
Issue #3113649 by bnjmnm, ayushmishra206, ilgnerfagundes, lauriii, nod_, xjm, catch, alexpott, Kristen Pol: Remove drupal.tabbingmanager's jQueryUI dependency
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 |