Skip to content

Commit 0d1a5df

Browse files
committed
Bug 1924605 [wpt PR 48611] - [reading-flow] display: contents participate in the flow, a=testonly
Automatic update from web-platform-tests [reading-flow] display: contents participate in the flow From CSSWG resolution [1]: > display:contents focusable element occurs immediately before its first child in visual order [1] w3c/csswg-drafts#9230 (comment) Currently, reading flow items in display: contents are ignored and display: contents elements are visited last in the focus order. That means we lose that order information. We update the algorithm so when we loop reading items and find one that is not in the focus scope, we traverse its parent to find an ancestor that is. This element can then be added in the reading flow instead. We update A11Y to behave the same way as focus navigation. Since the A11Y tree uses LayoutTreeBuilder, we update the algorithm to loop through each reading flow item's ancestor until its parent is the LayoutTreeBuilderTraversal::Parent. This element can then be added in the reading flow instead. Change-Id: I1c3c3ab3a6548611af9a2cfddecc9d889b0ecb14 Bug: 371024057 Bug: 40932006 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5924454 Commit-Queue: Di Zhang <dizhanggchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Cr-Commit-Position: refs/heads/main{#1368523} -- wpt-commits: 078000e068347d9558ff63ceb84510aad5953725 wpt-pr: 48611 UltraBlame original commit: 98d9d2eab45c9af3379a7b46c7a407389ce941e3
1 parent 396d5bf commit 0d1a5df

File tree

3 files changed

+72
-54
lines changed

3 files changed

+72
-54
lines changed

testing/web-platform/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-across-scopes.html

+18-17
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,18 @@
255255
-
256256
-
257257
Since
258-
C
259-
is
258+
B
259+
A
260+
are
261+
inside
260262
a
261-
direct
262-
reading
263-
flow
264-
item
265-
it
266-
is
263+
display
264+
:
265+
contents
266+
they
267+
are
267268
visited
268-
first
269+
together
269270
.
270271
-
271272
-
@@ -276,17 +277,17 @@
276277
-
277278
Since
278279
B
279-
A
280-
are
281-
inside
282-
a
280+
has
281+
order
282+
1
283+
its
283284
display
284285
:
285286
contents
286-
they
287-
are
287+
parent
288+
is
288289
visited
289-
after
290+
first
290291
.
291292
-
292293
-
@@ -305,9 +306,9 @@
305306
expect
306307
=
307308
"
308-
C
309309
B
310310
A
311+
C
311312
"
312313
data
313314
-

testing/web-platform/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-display-contents.html

+39-19
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@
280280
=
281281
"
282282
order1
283-
order3
284283
order2
285284
order4
285+
order3
286286
"
287287
data
288288
-
@@ -299,6 +299,17 @@
299299
same
300300
grid
301301
container
302+
and
303+
are
304+
placed
305+
in
306+
the
307+
position
308+
where
309+
their
310+
first
311+
child
312+
resides
302313
.
303314
"
304315
>
@@ -446,10 +457,10 @@
446457
"
447458
div1B
448459
order1B
449-
order3B
450460
div2B
451461
order2B
452462
order4B
463+
order3B
453464
"
454465
data
455466
-
@@ -466,18 +477,27 @@
466477
same
467478
grid
468479
container
469-
with
470-
focusable
480+
and
481+
are
482+
placed
483+
in
484+
the
485+
position
486+
where
487+
their
488+
first
489+
child
490+
resides
491+
.
492+
The
471493
display
472494
contents
473-
divs
474-
at
475-
the
476-
end
477-
of
478-
the
479-
focus
480-
sequence
495+
have
496+
tabindex
497+
and
498+
should
499+
be
500+
focusable
481501
.
482502
"
483503
>
@@ -643,18 +663,18 @@
643663
expect
644664
=
645665
"
646-
A1
647-
A2
648-
A3
649-
B1
650-
B2
651-
B3
652666
C1
653667
C2
654668
C3
655669
D1
656670
D2
657671
D3
672+
B1
673+
B2
674+
B3
675+
A1
676+
A2
677+
A3
658678
"
659679
data
660680
-
@@ -676,7 +696,7 @@
676696
div
677697
class
678698
=
679-
box
699+
wrapper
680700
>
681701
<
682702
div

testing/web-platform/tests/shadow-dom/focus-navigation/reading-flow/tentative/grid-order-with-slots.html

+15-18
Original file line numberDiff line numberDiff line change
@@ -603,15 +603,15 @@
603603
expect
604604
=
605605
"
606+
o1
607+
o3
608+
o5
606609
host3
607610
/
608611
o2
609612
host3
610613
/
611614
o4
612-
o1
613-
o3
614-
o5
615615
"
616616
data
617617
-
@@ -823,18 +823,18 @@
823823
expect
824824
=
825825
"
826-
host4
827-
/
828-
after
829-
host4
830-
/
831-
before
832826
b4
833827
a4
834828
d42
835829
d41
836830
d43
837831
c4
832+
host4
833+
/
834+
after
835+
host4
836+
/
837+
before
838838
"
839839
data
840840
-
@@ -1343,14 +1343,14 @@
13431343
expect
13441344
=
13451345
"
1346+
b6
1347+
a6
13461348
host6
13471349
/
13481350
after
13491351
host6
13501352
/
13511353
before
1352-
b6
1353-
a6
13541354
"
13551355
data
13561356
-
@@ -1543,11 +1543,11 @@
15431543
expect
15441544
=
15451545
"
1546-
a7
1547-
b7
15481546
host7
15491547
/
15501548
after
1549+
a7
1550+
b7
15511551
host7
15521552
/
15531553
before
@@ -1615,7 +1615,7 @@
16151615
"
16161616
order
16171617
:
1618-
4
1618+
5
16191619
"
16201620
id
16211621
=
@@ -1636,10 +1636,7 @@
16361636
display
16371637
:
16381638
block
1639-
"
1640-
style
1641-
=
1642-
"
1639+
;
16431640
order
16441641
:
16451642
4

0 commit comments

Comments
 (0)