Font sizes and resize text

The WCAG 2.0 requirements for resizing text are quite loose:

Resize text: Except for captions and images of text, text can be resized without assistive technology up to 200 percent without loss of content or functionality. (Level AA).

That’s it.

These “200 percent” are up to debate (not sufficient) and most likely this requirement will be changed in the WCAG 2.1 specifications.

Best practice Best practice

  • Text can be enlarged without text becoming unreadable or hidden, and without breaking the design.
  • Line heights and overflows: test this with various browsers and screen widths.
  • Start with a reasonable font size. A font size of at least 16 pixels is works well for body copy.
  • How to define font size is no big deal. Whether a font size is defined in pixels, rem, rem or % units for resizing doesn’t really matter. Modern browsers adequately resize text regardless of how the size has been defined.

Relative units vs. absolute units Relative units vs. absolute units

There is much research and debate about whether text elements should be defined in pixels, em, rem or % units for resizing, and whether only the text or also other elements on a page should scale.

Operating systems, browsers and devices have various ways to enlarge text:

  • with the OS settings
  • with assistive technology, like Zoom Text
  • browser settings to enlarge text
  • a plugin that changes the default text size
  • zoom in and out with they keys Control plus and minus in the browser
  • using your fingers on touch devices
  • reader view in browsers

The WordPress Accessibility Team agrees with WebAim on font size:

For development purposes, it is best to use relative units (such as percentages or ems) to specify font sizes rather than absolute units (such as pixels or points). This provides much flexibility in modifying the visual presentation using CSS. For accessibility, because modern browsers adequately resize text regardless of how the size has been defined, it is not vital that text sizes be defined in relative sizes.

Top ↑

Viewport Viewport

  • Always give the user the opportunity to scale the display.
  • Never set the viewport to user-scalable=no, it prevents the user from using the browser’s zoom on mobile devices.

Top ↑

Resources Resources

Top ↑

The pixels / rem /em / debate The pixels / rem /em / debate

Top ↑

On readability On readability

Top ↑

On Viewport On Viewport