jquery.tabbable icon indicating copy to clipboard operation
jquery.tabbable copied to clipboard

Adding options for disabling and enabling tabbable elements

Open FesterCluck opened this issue 9 years ago • 3 comments

These new functions are useful for disabling tabbing functionality behind modals, or in any other logical group.

One would either use this before creating a modal:

$.disableTabbing();

or if the element exists on the page:

$.disableTabbing({exclude: $(".modal")});

Either way, using this will return the page to normal:

$.enableTabbing();

It's important to note my changes update a core filter in jQuery, :hidden. It incorrectly includes inline elements with 0 offsetHeight & offsetWidth. I'm happy to resubmit without it, but in testing it seems core that it needs to be done. I've submitted a bug to jQuery on the matter.

Future updates: I'll likely teach tabIndexes[] to keep track of when the index doesn't actually exist as an attribute so it doesn't get added to elements which didn't have it previously.

FesterCluck avatar Nov 12 '14 02:11 FesterCluck