CKTIS / CSS
CSS property `reading-order`
The `reading-order` property assigns a direct child to an integer ordinal group within its parent’s `reading-flow`; lower-numbered groups are visited first.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<integer>The reading-order property assigns a direct child to an integer ordinal group within its parent’s reading-flow; lower-numbered groups are visited first.
The example puts source-order on the container and gives the third button -1; real Tab presses in Chromium produce three,one,two while visual layout stays unchanged.
Grammar: <integer>.
The initial value is 0, negative integers are allowed, and the parent flow breaks ties. The property only acts on direct block-level children or grid/flex items of a reading-flow container; with a normal parent, on a deeper descendant, or outside such a container it does not change navigation. It is not inherited and cannot repair an illogical DOM.
Examples
<!doctype html><meta charset="utf-8"><style>.list{reading-flow:source-order}.list button{display:block}#three{reading-order:-1}</style><div class="list"><button id="one">one</button><button id="two">two</button><button id="three">three</button></div><pre id="result"></pre><script>const seen=[];document.addEventListener('focusin',e=>{if(e.target.tagName==='BUTTON'){seen.push(e.target.id);if(seen.length===3){if(seen.join(',')!=='three,one,two')throw new Error('reading-order mismatch '+seen);result.textContent='focus='+seen.join(',')+'; third='+getComputedStyle(three).readingOrder}}});</script>Result
focus=three,one,two; third=-1
The example puts `source-order` on the container and gives the third button `-1`; real Tab presses in Chromium produce `three,one,two` while visual layout stays unchanged.