What fresh hell is THIS now? - Patrick Lauke
visibility: hidden
, it’s not hardware accelerated so can cause performance issues. (same as display: none
)
inert
polyfill is the only option (or a manual implementation of what it does) right now
tabindex="-1"
on each focusable thing and aria-hidden
on the wrapper, plus opacity which is hardware accelerated. But that's where inert
would be fantastic
inert
handles the focusables and the accessibility tree, but not the display
inert
. Happy to help explain more about focus mgmt if needed!
inert
on the regions where you want to avoid the user focusing. It would be a lot simpler than changing tabindex for every element.
inert
on sibling elements to the menu/dialog thingy.
tabindex="-1"
on each control inside of a region and wrapped it with aria-hidden="true"
, except you can do it with a single attribute. It would prevent keyboard/screen reader interaction in that region, leaving non-inert areas to be interactive
tabindex="-1"
has to go on the focusable element you're trying to remove from the tab order, it does not cascade from wrapping elements (unlike inert
). But that sounds like a bit of the cart before the horse if the menu is opening on tab
tabindex="0"
, nor does an anchor with an href.