From 97a14d95410603835891336d159e67666508d6a3 Mon Sep 17 00:00:00 2001
From: Di Zhang
By default, the order within a tabindex-ordered focus navigation scope is - determined by each of its element's tabindex value. This ordering criteria is - sometimes overridden, as is the case with reading-flow-ordered focus navigation scopes.
+By default, the order within a tabindex-ordered focus navigation scope is determined + by each element's tabindex value. This ordering criteria is sometimes overridden, as is + the case with reading-flow-ordered focus + navigation scopes.
A reading-flow-ordered focus navigation scope is a tabindex-ordered focus navigation scope whose focus navigation scope owner is a @@ -80097,7 +80097,7 @@ dictionary ToggleEventInit : EventInit {
A reading-flow-ordered scope owner is either: CSSDISPLAY
a reading flow container.
a reading flow container, or
an element delegating its rendering to its children whose CSS parent box is a reading flow container.
A reading flow item is an element whose parent element is a reading-flow-ordered scope owner.
-The reading flow order of a reading-flow-ordered focus navigation scope scope is the ordered list of elements constructed as follows:
+The reading flow order of a reading-flow-ordered focus navigation scope + scope is the ordered list of elements constructed as follows:
Let output be an empty list.
Let output be « ».
Let owner be the focus navigation scope owner of scope.
Different items can have the same inclusive ancestor. + Only add to output if it is not already in the reading flow order. This + loop stops when the inclusive ancestor of item within the flat + tree is in the scope.
+Set item to the parent element of item within the flat tree.
The rendering-defined sibling reading flow includes descendants of the reading flow container that are not in + the reading-flow-ordered focus navigation scope. This step traverses the inclusive ancestors of item within the flat + tree to find a potential element to include in the reading flow order.
For each child of owner element's - children:
+For each child of owner element's children, in tree order:
If child's focus navigation scope owner is owner and output does not contain child, ToggleEventInit : EventInit {
Return output.
The following shows an example of how to compute the reading flow order.
+The following example shows how to get the flattened tabindex-ordered focus navigation
+ scope for wrapper
.
<!DOCTYPE html>
<html lang="en">
@@ -80194,60 +80207,154 @@ dictionary ToggleEventInit : EventInit {
</body>
</html>
-
+
- For a reading-flow-ordered focus navigation scope where wrapper is the focus scope owner:
+In this example, wrapper
is the focus navigation scope owner
+ of a reading-flow-ordered focus navigation scope and a reading flow
+ container. Its reading flow order is computed as follows:
Let output be [].
Per step 4, we get wrapper
's rendering-defined sibling
+ reading flow items as « A
, F
,
+ C
, H
».
Let owner be wrapper.
Per step 5, we loop through items:
-Let container be wrapper.
A
's focus navigation scope owner is wrapper
, it is added to output.
The rendering-defined sibling reading flow is sorted by the CSS order attribute. The - items list is [A, F, C, H].
F
's focus navigation scope owner is DC
.
Looping through the items, F and C do not have wrapper as its owner, but its parent DC - do. Output is now [A, DC, H].
Set item to be F
's parent element within the
+ flat tree, DC
.
Looping through the children of wrapper, we find PA as not visited reading flow item of - owner. Output is now [A, DC, H, PA].
DC
's focus navigation scope owner is wrapper
, it is added to output.
Return output [A, DC, H, PA].
C
's focus navigation scope owner is DC
.
For a reading-flow-ordered focus navigation scope where display: contents DC is the focus - scope owner:
+Set item to be C
's parent element within the
+ flat tree, DC
.
Let output be [].
DC
's focus navigation scope owner is wrapper
, but it is already in output.
H
's focus navigation scope owner is wrapper
, it is added to output.
Let owner be DC.
output is « A
, DC
, H
».
Let container be wrapper.
Per step 6, we loop through the children of wrapper
in tree order:
The rendering-defined sibling reading flow is sorted by the CSS order attribute. The - items list is [A, F, C, H].
A
is already in output.
Looping through the items, only F and C's owner is DC. Output is now [F, C].
DC
is already in output.
Looping through the children of DC, there are no more child to append.
PA
's focus navigation scope owner is wrapper
, it is added to output.
Return output [F, C].
H
is already in output.
Note that A, C, F, PA and H are focus scope owners because they are reading flow items. They - will follow a tabindex-ordered focus navigation scope and the ordering is not affected by the - CSS reading-flow property. In the focus navigation scope of C, the focus order will be [E, D] - because E has a positive tabindex.
+output is « A
, DC
, H
, PA
».
Combining everything together, the flattened tabindex-ordered focus navigation scope is: - [Wrapper, A, B, DC, F, C, E, D, H, PA, G].
+Notice that DC
is the focus navigation scope owner of a
+ reading-flow-ordered focus navigation scope, but its reading flow
+ container is still wrapper
. Its reading flow order is
+ computed as follows:
Per step 4, we again get wrapper
's rendering-defined sibling
+ reading flow items as « A
, F
,
+ C
, H
».
Per step 5, we loop through items:
+ +A
's focus navigation scope owner is wrapper
.
Set item to be A
's parent element within the
+ flat tree, wrapper
.
While loop ends because item is the container.
F
's focus navigation scope owner is DC
, it is added to output.
C
's focus navigation scope owner is DC
, it is added to output.
H
's focus navigation scope owner is wrapper
.
Set item to be H
's parent element within the
+ flat tree, wrapper
.
While loop ends because item is the container.
output is « F
, C
».
Per step 6, we loop through the children of wrapper
in tree order:
C
is already in output.
F
is already in output.
output is « F
, C
».
A
, C
, F
, PA
and H
are reading flow
+ items. Each is the focus navigation scope owner of a tabindex-ordered
+ focus navigation scope that does not follow the reading flow order. For example,
+ the focus navigation scope of C will be « E
, D
» because E
has a higher positive tabindex
+ value than D
.
Combining everything together, the flattened tabindex-ordered focus navigation scope
+ for wrapper
is « wrapper
, A
,
+ B
, DC
, F
, C
, E
, D
, H
,
+ PA
, G
».