Skip to content

Enlarged text cut off by fixed-height boxes

A header with a fixed height and hidden overflow cannot grow when the text gets bigger, so part of the menu is cut off.

01

The problem

People who enlarge text can't read, or see where they are on, the part of the page that is cut off.

02

Try it

Enlarge the text to 200% and read the menu.

Drag the Text size slider. Can you still read every link in the header?

100%
Cart (2)

Autumn notebooks are in

Hand-bound, 120 pages, in four colours.

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Swap the fixed height for a minimum height, and fold the links into a menu if the header must stay on one row.

  1. 1Give anything that holds text a min-height, or no height, never a fixed one.
  2. 2Don't hide overflow on text; clip decoration on an element of its own.
  3. 3If the links must stay on one row, fold them behind a menu button, not out of sight.
Before A header with a fixed height

html

<header class="site-header">  <a href="/" class="logo">Inkwell &amp; Co</a>  <nav aria-label="Main">    <ul class="site-nav">      <li><a href="/collections/pens">Pens</a></li>      <li><a href="/collections/paper">Paper</a></li>      <li><a href="/collections/gift-sets">Gift sets</a></li>      <li><a href="/pages/workshops">Workshops</a></li>      <li><a href="/blogs/journal">Journal</a></li>      <li><a href="/pages/contact">Contact</a></li>    </ul>  </nav>  <a href="/cart" class="cart">Cart (2)</a></header>

css

.site-header {  display: flex;  align-items: center;  gap: 24px;  height: 80px;  padding: 0 24px;  overflow: hidden;}.site-nav {  display: flex;  flex-wrap: wrap;  gap: 0 24px;  margin: 0;  padding: 0;  list-style: none;}.cart { margin-left: auto; }
After Let the header grow
.site-header {  display: flex;  align-items: center;  gap: 24px;  min-height: 80px; /* not height */  padding: 0 24px;  /* no overflow: hidden */}

04

Verify the fix

5 checks, no mouse.

Test with: Zoom, Keyboard

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared header or theme settings change.

Limits

This is a starting pattern, not a guarantee for every application. Strictly, 1.4.4 can be met by full-page zoom alone, but many people enlarge text only, and a box that clips then also clips at zoom when the page is narrow. Paths and class names in the snippets are placeholders. Test every page template, not only the header.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work