From 7db993dafab2193e63e1eda2666053d213fac9c7 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 25 Aug 2021 13:14:42 -0400 Subject: [PATCH] Improve autofocus and delegatesFocus interaction Now, when focusing a shadow host with delegates focus set, we try to focus the first focusable area with the autofocus attribute set, instead of just the first focusable area. Closes #833. --- source | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source b/source index 324d5e9f76f..6ea05b70846 100644 --- a/source +++ b/source @@ -74997,24 +74997,24 @@ END:VCARD currently focused area of a top-level browsing context's DOM anchor, then return null. -
  • -

    Otherwise:

    - -
      -
    1. If focus trigger is "click", then let possible - focus delegates be the list of all click focusable focusable areas whose DOM anchor is a descendant - of focus target in the flat tree.
    2. - -
    3. Otherwise, let possible focus delegates be the list of all focusable areas whose DOM anchor is a descendant - of focus target in the flat tree.
    4. - -
    5. Return the first focusable area in tree order of their DOM anchors in possible focus delegates, or null if - possible focus delegates is empty.
    6. -
    -
  • +
  • If focus trigger is "click", then let possible + focus delegates be the list of all click focusable focusable areas whose DOM anchor is a descendant + of focus target in the flat tree.

  • + +
  • Otherwise, let possible focus delegates be the list of all focusable areas whose DOM anchor is a descendant + of focus target in the flat tree.

  • + +
  • If any of the focusable areas in possible + focus delegates have a DOM anchor whose autofocus content attribute is specified, then return the + first such focusable area in tree order of their DOM anchors.

  • + +
  • Return the first focusable area in tree order of their DOM anchors in possible focus delegates, or null if + possible focus delegates is empty.

  • For sequential focusability, the