microsoft / tabster

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

Shadow DOM: implement a "getParent()" function to correctly walk up the DOM tree for elements in the shadow root #339

Open spmonahan opened 8 months ago

spmonahan commented 8 months ago

Tabster currently uses Node.parentElement to walk up the parents of a given element. This method will not walk up from shadow root (or from slotted elements).

We need to implement a "getParent(element)" function to handle elements inside shadow roots and slotted elements.

This is implemented

We need to validate it with tests and decide how to best integrate it into Tabster.