empathyco / x

Commerce Search & Discovery frontend web components
Apache License 2.0
80 stars 21 forks source link

fix(BaseKeyboardNavigation): navigation with Shadow DOM enabled #1571

Closed diegopf closed 3 months ago

diegopf commented 3 months ago

This pull request addresses the issues with the BaseKeyboardNavigation component when the Shadow DOM is enabled. The following changes have been made to ensure seamless keyboard navigation and event handling within Shadow DOM boundaries.

Type of change

What is the destination branch of this PR?

How has this been tested?

These changes should be tested along with x-archetype with Shadow DOM enabled. You can check that the predictive layer in the empathize component is now reachable with the keyboard. An additional unit test for retrieving the active element as added.

Tests performed according to testing guidelines: