microsoft / tabster

Web Application Keyboard Navigation Tools
https://tabster.io
MIT License
116 stars 34 forks source link

feat(Modalizer): Adding semi-internal noDirectAriaHidden flag to tap into the process of setting aria-hidden. #386

Closed mshoho closed 3 months ago

mshoho commented 3 months ago

When Modalizer sets aria-hidden for elements outside of active modalizer, it checks if the element is inside the modalizer first. In combination with custom getParent() this allows to avoid setting aria-hidden on elements which are virtually part of the modalizer (like popups rendered to body). However, this is not enough when the virtual children are placed into an extra container. noDirectAriaHidden could be set on the container and instead of setting aria-hidden directly, Modalizer will go inside the container and set aria-hidden on its children considering the virtual parenthood of each child.