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
Traversal to mark all parent chain of as "elementToKeep" gets stuck at shadow root since it's using element.parentNode, so no top level parent (direct child of body) is reached.
And since it's using target.ownerDocument.body to start setting aria-hidden: "true", it just stops after hiding all of its children, which is pretty much everything on the page :(
Consumer can indeed address this issue manually, but maybe we could change the default getDefaultParent to return shadow root to make this easier for everyone, since not all will notice this is broken.
However in some cases if not most, I don't think hiding everything only within a shadow DOM is going to work, so it could be better to fix parent traversal.
keep(el.parentNode??el.host);
The text was updated successfully, but these errors were encountered:
Traversal to mark all parent chain of as "elementToKeep" gets stuck at shadow root since it's using
element.parentNode
, so no top level parent (direct child ofbody
) is reached.aria-hidden/src/index.ts
Line 50 in 95843f2
And since it's using
target.ownerDocument.body
to start settingaria-hidden: "true"
, it just stops after hiding all of its children, which is pretty much everything on the page :(aria-hidden/src/index.ts
Line 10 in 95843f2
Consumer can indeed address this issue manually, but maybe we could change the default
getDefaultParent
to return shadow root to make this easier for everyone, since not all will notice this is broken.aria-hidden/src/index.ts
Line 3 in 95843f2
Maybe something like that could work?
However in some cases if not most, I don't think hiding everything only within a shadow DOM is going to work, so it could be better to fix parent traversal.
The text was updated successfully, but these errors were encountered: