SIGN IN SIGN UP

Fix anchored region focus across shadow DOM and inline popups (#5041)

* Fix anchored region focus across shadow DOM

* Remove Playwright test infrastructure

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Exclude the open popup when finding the next page element after the anchor

CloseAsync is invoked after focus() and resolves asynchronously, so the popup is
still in the DOM during traversal. For popups rendered inline next to their
anchor (FluentPopover, and FluentMenu with DrawMenuWithoutService), the next
focusable element in document order after the anchor is the popup's own content,
so Tab from the last item looped back into the popup instead of leaving it.

Filter the popup's composed subtree out of the candidate list before locating
the anchor, and take the following candidate without wrapping.

* Add Popover keyboard navigation demo example

Adds an example where the popover is declared between its anchor and the
next control, which is the arrangement the existing Popover examples do
not cover and the one the anchored region focus fix addresses.

* update popover example

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Denis Voituron <dvoituron@outlook.com>
A
Adam Ratzman committed
d1ae2f63ceeb07d36fc07ea775fc0f8879809a5d
Parent: 218981e
Committed by GitHub <noreply@github.com> on 7/28/2026, 3:11:04 PM