diff --git a/source b/source index 6912026b81c..f7cbf7cee35 100644 --- a/source +++ b/source @@ -2986,7 +2986,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Let root be focus target's shadow root.
If root is a shadow-including inclusive ancestor of the +
If focus target is a shadow-including inclusive ancestor of the currently focused area of a top-level browsing context's DOM anchor, then return null.
Return the focus delegate for root given focus
+ Return the focus delegate for focus target given focus
trigger.
Let autofocus delegate be the autofocus delegate for - focus target given focus trigger.
Let autofocus delegate be the autofocus delegate for focus + target given focus trigger.
If autofocus delegate is not null, then return autofocus delegate.
If focus trigger is "click
", then let possible
- focus delegates be the list of all click focusable focusable areas whose DOM anchor is a shadow-including
- descendant of focus target.
If focus target is a shadow host and its shadow root's delegates focus is false, + then return null.
Otherwise, let possible focus delegates be the list of all focusable areas whose DOM anchor is a - shadow-including descendant of focus target.
Let parent be focus target.
If possible focus delegates is empty, then return null.
If parent is a shadow host, then set parent to + parent's shadow root.
Sort possible focus delegates by shadow-including tree order of - their DOM anchors.
For each child of parent's children:
-Return possible focus delegates[0].
Let focusable area be child, if child is a + focusable area; otherwise let focusable area be the result of getting the focusable area for child given + focus trigger.
+ +This step can end up recursing, i.e., the get the focusable area + steps might return the focus delegate of child.
+If focusable area is not null, then return focusable + area.
Return null.
The above algorithm essentially returns the first suitable focusable + area where the path between its DOM anchor and focus target + delegates focus at any shadow tree boundaries.
+The autofocus delegate for a focus target given a focus trigger is given by the following steps: