Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

CSS property `reading-flow`

The `reading-flow` property sets speech and linear sequential-navigation order without changing layout or painting order for children of a block, flex, or grid container.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order

The reading-flow property sets speech and linear sequential-navigation order without changing layout or painting order for children of a block, flex, or grid container.

The example combines flex-direction:row-reverse with reading-flow:flex-visual; real Tab presses in Chromium visit the buttons as three,two,one, following the visual left-to-right direction.

Grammar: normal | source-order | flex-visual | flex-flow | grid-rows | grid-columns | grid-order.

normal keeps DOM order; source-order establishes a reading-flow container and enables reading-order on direct children. flex-visual follows visual flex order, flex-flow the flex direction, grid-rows rows, grid-columns columns, and grid-order the order modified by order; flex and grid values only act on the matching container type. The fundamental logical order should still live in the DOM.

Examples

<!doctype html><meta charset="utf-8"><style>.row{display:flex;flex-direction:row-reverse;reading-flow:flex-visual}.row button{width:60px;height:30px}</style><div class="row"><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,two,one')throw new Error('reading-flow mismatch '+seen);result.textContent='focus='+seen.join(',')+'; computed='+getComputedStyle(document.querySelector('.row')).readingFlow}}});</script>

Result

focus=three,two,one; computed=flex-visual

The example combines `flex-direction:row-reverse` with `reading-flow:flex-visual`; real Tab presses in Chromium visit the buttons as `three,two,one`, following the visual left-to-right direction.

Sources