liveBook · Manning

Flexible CSS layout

As explained in Architecting Accessibility

A flexible CSS layout arranges content so its dimensions and positions can adapt to changing content or available space.

When someone increases text spacing to make a page easier to read, its layout should adapt without hiding content or functionality. Avoid fixed sizes and absolute positioning for text and layout elements; use flexible CSS layouts such as Flexbox or Grid. section 4.4.3

When fixed sizing cuts off content

A container with a fixed height and hidden overflow can make a “Read more” link disappear after custom text spacing is applied. Test a page with increased line height, paragraph spacing, word spacing, and letter spacing to check whether content and controls remain visible. section 4.4.3

body * {
  line-height: 1.5 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}
p { margin-bottom: 2em !important; }

Apply custom spacing rules in browser developer tools to check whether text and interface controls adapt without being cut off. section 4.4.3

How Architecting Accessibility covers it

How deep it goes
Explains the flexible-layout principle, contrasts fixed sizing, and provides a browser-based spacing test.
Examples
Demonstrates a disappearing “Read more” link and tests increased line, paragraph, word, and letter spacing.
What you can do after
Apply flexible CSS layouts to keep content and controls available when users increase text spacing.
How it connects
Connects flexible layouts to text spacing, fixed dimensions, absolute positioning, Flexbox, and Grid.

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.