Skip to content

Commit 4bb6d30

Browse files
committed
[css-display-4] Define 'reading-order: auto' #7387
1 parent 8eaf5f1 commit 4bb6d30

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

css-display-4/Overview.bs

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ Reading Order: the 'reading-order' property</h3>
11381138

11391139
<pre class='propdef'>
11401140
Name: reading-order
1141-
Value: <<integer>>
1142-
Initial: 0
1141+
Value: auto | <<integer>>
1142+
Initial: auto
11431143
Applies to: all elements
11441144
Inherited: no
11451145
Computed value: specified integer
@@ -1149,10 +1149,22 @@ Reading Order: the 'reading-order' property</h3>
11491149
The 'reading-order' property controls the order in which
11501150
elements are rendered to speech
11511151
or are navigated to when using (linear) sequention navigation methods.
1152-
It takes a single <dfn value for=reading-order><<integer>></dfn> value,
1153-
which specifies which ordinal group the item belongs to.
1154-
Sibling elements are ordered starting from the lowest numbered ordinal group and going up;
1155-
elements with the same ordinal group are keep the order they appear in the source document.
1152+
This is their <dfn>reading and navigation order</dfn>.
1153+
1154+
<dl dfn-type=value dfn-for=reading-order>
1155+
<dt><dfn>auto</dfn>
1156+
<dd>
1157+
Same as ''0'' except that in randomizing formatting contexts
1158+
(which are only reasonable to apply to inherently unordered content)
1159+
the reading order is matched to the layout order.
1160+
See [[#randomizing-layout]].
1161+
1162+
<dt><dfn><<integer>></dfn>
1163+
<dd>
1164+
Specifies which ordinal group the item belongs to.
1165+
Sibling elements are ordered starting from the lowest numbered ordinal group and going up;
1166+
elements with the same ordinal group are keep the order they appear in the source document.
1167+
</dl>
11561168

11571169
The 'reading-order' property affects neither layout nor painting order
11581170
and therefore has no effect on rendering to the visual [=canvas=].
@@ -1176,6 +1188,39 @@ Reading Order: the 'reading-order' property</h3>
11761188

11771189
ISSUE: Is this the most appropriate interaction with with <code>tabindex</code>?
11781190

1191+
<h4 id="randomizing-layout">
1192+
Randomizing Layout Methods and ''reading-order: auto''</h4>
1193+
1194+
<dfn>Randomizing formatting contexts</dfn>
1195+
are formatting contexts in which which can indiscriminately scramble the layout order,
1196+
as listed below.
1197+
Since use of such methods indicates that the underlying order of the elements
1198+
is not important,
1199+
the UA will match the [=reading and navigation order=] of the elements
1200+
to match the layout order of their boxes as follows:
1201+
1202+
<dl>
1203+
<dt>''grid-auto-flow: dense''
1204+
<dd>
1205+
When ''grid-auto-flow: dense'' <a spec=css-grid-1>automatic placement</a>
1206+
changes the relative order of an item
1207+
with respect to other items with ''reading-order/auto'' or ''reading-order/0'' 'reading-order'
1208+
by shifting it earlier in the grid placement order,
1209+
then its placement in the [=reading and navigation order=] is likewise shifted.
1210+
1211+
<div class="example">
1212+
For example, [=grid items=] are laid out in a ''grid-auto-flow: column dense'' grid,
1213+
they are first re-ordered to [=order-modified document order=]
1214+
before applying the [[css-grid-1#auto-placement-algo]].
1215+
Among the subset of these items whose ''reading-order'' is ''0'' or ''auto'',
1216+
those with ''reading-order: auto'' are shifted
1217+
to the latest position in the [=reading and navigation order=]
1218+
that is also after any items with ''reading-order: 0'' or ''reading-order: auto''
1219+
that came earlier in the [=grid-modified document order=]
1220+
(with the major axis as specified by ''grid-auto-flow'').
1221+
</div>
1222+
</dl>
1223+
11791224
<h3 id='layout-order'>
11801225
Box Order: the 'layout-order' property</h3>
11811226

0 commit comments

Comments
 (0)