From f938eec99e167202dc5e9e4e8067ab4d53e10834 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Wed, 4 Jan 2023 18:39:43 -0800 Subject: [PATCH] Fix focus traversal for self-referential invoker In the case that a popover contains an invoker that points back to that invoker, the tab navigation code used to get confused. E.g.: ``` ``` In this case, trying to tab between the first and second button would break because the second button appeared to be an invoker for a new popover, when in reality it was an invoker for the same popover. Fixed: 1399601 Bug: 1307772 Change-Id: I276370d7c8eee0dd32f0c89da202a0d3777bf911 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133482 Commit-Queue: Mason Freed Auto-Submit: Mason Freed Commit-Queue: Joey Arhar Reviewed-by: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1089080} --- .../popovers/popover-focus-2.tentative.html | 16 ++++++++++++++++ .../popover-light-dismiss.tentative.html | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/html/semantics/popovers/popover-focus-2.tentative.html b/html/semantics/popovers/popover-focus-2.tentative.html index e0effbd866c4f5..569b633886cf6a 100644 --- a/html/semantics/popovers/popover-focus-2.tentative.html +++ b/html/semantics/popovers/popover-focus-2.tentative.html @@ -90,6 +90,22 @@ }, "Popover focus navigation"); + +
+ + + +
+ + +
diff --git a/html/semantics/popovers/popover-light-dismiss.tentative.html b/html/semantics/popovers/popover-light-dismiss.tentative.html index 83573c86f06f83..3c48bd9274e88e 100644 --- a/html/semantics/popovers/popover-light-dismiss.tentative.html +++ b/html/semantics/popovers/popover-light-dismiss.tentative.html @@ -392,8 +392,9 @@

Popover 4

-
Popover 2 +
Popover 2 (self-anchor-linked) +
Popover 3