diff --git a/source b/source index aac8bb72e5f..8f5b6621645 100644 --- a/source +++ b/source @@ -3789,6 +3789,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • inline formatting context
  • replaced element
  • CSS box
  • +
  • The 'reading-flow' property
  • +
  • order-modified document order
  • The following features are defined in CSS Flexible Box Layout: @@ -3935,7 +3937,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

  • The 'direction' property
  • The 'unicode-bidi' property
  • The 'writing-mode' property
  • -
  • The block flow direction, +
  • The writing +mode, + block flow direction, block axis, inline axis, block size, @@ -79385,9 +79389,9 @@ dictionary ToggleEventInit : EventInit {

    A node is a focus navigation scope owner if it is a Document, a - shadow host, a slot, or an element in the shadow host, a slot, an element in the popover showing state which also has a popover - invoker set.

    + invoker set, or a reading flow scope owner.

    Each focus navigation scope owner has a focus navigation scope, which is a list of elements. Its contents are determined as follows:

    @@ -79399,6 +79403,9 @@ dictionary ToggleEventInit : EventInit {
    1. If element's parent is null, then return null.

    2. +
    3. If element is a reading flow scope owner, then return + element.

    4. +
    5. If element's parent is a shadow host, then return element's assigned slot.

    6. @@ -79420,8 +79427,9 @@ dictionary ToggleEventInit : EventInit {

      The order of elements within a focus navigation scope does not impact any of the algorithms in this specification. Ordering only becomes important for the - tabindex-ordered focus navigation scope and flattened tabindex-ordered focus - navigation scope concepts defined below.

      + tabindex-ordered focus navigation scope, flattened tabindex-ordered focus + navigation scope and reading-flow focus navigation scope concepts defined + below.

      A tabindex-ordered focus navigation scope is a list of focusable areas and focus navigation @@ -79441,7 +79449,9 @@ dictionary ToggleEventInit : EventInit {

      The order within a tabindex-ordered focus navigation scope is determined by each - element's tabindex value, as described in the section below.

      + element's tabindex value and, for reading-flow focus navigation scope, + by the special rules provided by the sequential navigation search algorithm. The + tabindex value should takes precedence over reading flow.

      The rules there do not give a precise ordering, as they are composed mostly of "should" statements and relative orderings.

      @@ -79671,6 +79681,78 @@ dictionary ToggleEventInit : EventInit { +
      + +

      The reading flow

      + +

      A reading flow container is either:

      + +
        +
      • a flex + container that has the 'reading-flow' CSS property set to 'flex-visual' or + 'flex-flow'.

      • +
      • a grid + container that has the 'reading-flow' CSS property set to 'grid-rows', + 'grid-columns' or 'grid-order'.

      • +
      + +

      A reading flow scope owner is either:

      + +
        +
      • a reading flow container.

      • +
      • an element delegating its rendering to its children whose parent + element is a reading flow container.

      • +
      + +

      A reading flow item is an element whose parent + element is a reading flow scope owner.

      + +

      A non participating reading flow item is + a reading flow item whose computed value of the + 'display' property is 'contents' or whose computed value of the + 'position' property is 'fixed' or 'absolute'.

      + +

      A participating reading flow item is a reading flow item that is not a non participating reading flow item.

      + +

      A reading-flow focus navigation scope is a tabindex-ordered focus navigation + scope where the focus navigation scope owner is a reading flow scope + owner.

      + + The reading flow order for a reading-flow focus navigation scope is + determined by the scope owner's computed value of the 'reading-flow' property: + +
        +
      • For 'flex-visual': the reading flow should be defined by sorting the participating reading flow items in the visual + reading flow order and taking the writing mode into account, followed by non participating reading flow + items.

      • +
      • For 'flex-flow': the reading flow should be defined by sorting the participating reading flow items using the 'flex-flow' + direction, followed by non participating + reading flow items.

      • +
      • For 'grid-rows': the reading flow should be defined by sorting the participating reading flow items first by their + displayed row order, and then by their column order, taking the writing mode into + account, followed by non participating + reading flow items.

      • +
      • For 'grid-columns': the reading flow should be defined by sorting the participating reading flow items first by their + displayed column order, and then by their row order, taking the writing mode into + account, followed by non participating + reading flow items.

      • +
      • For 'grid-order': the reading flow should be defined by sorting the participating reading flow items in + order-modified document order, followed by non participating reading flow + items.

      • +
      + +
      +

      Processing model

      @@ -80275,6 +80357,22 @@ dictionary ToggleEventInit : EventInit { (when it's not, selection mechanism will be DOM).

      +
    7. +

      If candidate is a reading flow item or + null, direction is forward, and starting point is in a + reading-flow focus navigation scope scope, then let new + candidate be the result of running the reading flow sequential navigation search + algorithm with candidate as the first argument, direction as the + second, and starting point's focus navigation scope as the third.

      + +

      If starting point is a reading flow item, + direction is backward, and starting point is in a + reading-flow focus navigation scope scope, then let new + candidate be the result of running the reading flow sequential navigation search + algorithm with starting point as the first argument, direction as + the second, and starting point's focus navigation scope as the third.

      +
    8. +
    9. If candidate is a navigable container with a non-null content navigable, then let new candidate be the result of running the @@ -80282,7 +80380,9 @@ dictionary ToggleEventInit : EventInit { navigable as the first argument, direction as the second, and sequential as the third.

      +
    10. +
    11. If new candidate is null, then let starting point be candidate, and return to the top of this algorithm. Otherwise, let candidate be new candidate.

      @@ -80291,6 +80391,64 @@ dictionary ToggleEventInit : EventInit {
    12. Return candidate.

    +

    The reading flow sequential navigation search algorithm consists of the following + steps. This algorithm takes three arguments: a reading flow item current, a direction + direction and a reading-flow focus navigation scope scope.

    + +
      +
    1. + Let reading flow items be the list of reading flow + items owned by scope, sorted in reading flow. +
    2. +
    3. + If reading flow items is empty, return null. +
    4. +
    5. If direction is forward, then: +
        +
      1. + If current is the reading flow item from + reading flow items that comes first in tree order, return first + item in reading flow items. +
      2. +
      3. + If current is null, let previous be the reading flow item from reading flow items that + comes last in tree order. +
      4. +
      5. + Otherwise, let previous be the reading flow + item that comes before current in tree order. +
      6. +
      7. + If previous is the last item in reading flow items, return null. +
      8. +
      9. + Otherwise, return the reading flow item that comes + after previous in reading flow items. +
      10. +
      +
    6. +
    7. Otherwise: +
        +
      1. + Let previous be the item that comes before current in reading + flow items. +
      2. +
      3. + If previous is null, return null. +
      4. +
      5. + Otherwise, if previous does not have any descendant, return + previous. +
      6. +
      7. + Otherwise, return the last descendant of previous. +
      8. +
      + +
    8. +
    +