You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to apply inert attribute to all child elements of certain node, using selector like '.main '. it adds inert attribute to all elements in dome under .main node, also this adds tabindex and aria-hidden. But when I remove inert by using selector '[inert]' and removeAttribure - inert and aria-hidden attribute are removed, but tabindex keeps in elements, and elements can't be focused.
All works if I use specific selector like '.main span' or '.main .links'.
Looks like * selector broke inert polyfill or it can't work with elements, which was getting bu such selector.
The text was updated successfully, but these errors were encountered:
Are you saying that you did a querySelectorAll with a * at the end and then looped through applying inert? Any chance you can share a test/codepen or something illustrating?
Sorry for late answer.
I tried to repeat my old code, where I use * selector, but it works fine on codepen, might be because I use simple code. And might be early my code worked bad, because I used inert in bad way: I got all elements exclude popup form, than I filter them by focusible and apply inert for these elements in cicle: var $allRootElementsExcludePopup = $('body > *').not(popup); var $elementsToInert = $(":focusable", $allRootElementsExcludePopup); $.each($elementsToInert, function(index, value) { if (value.getAttribute('inert') === null) { value.setAttribute('inert', ''); } else { value.removeAttribute('inert'); } })
I have rewrote this old code already and now inert works very well.
I tried to apply inert attribute to all child elements of certain node, using selector like '.main '. it adds inert attribute to all elements in dome under .main node, also this adds tabindex and aria-hidden. But when I remove inert by using selector '[inert]' and removeAttribure - inert and aria-hidden attribute are removed, but tabindex keeps in elements, and elements can't be focused.
All works if I use specific selector like '.main span' or '.main .links'.
Looks like * selector broke inert polyfill or it can't work with elements, which was getting bu such selector.
The text was updated successfully, but these errors were encountered: