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 technologyAssistive technology Assistive technology is an umbrella term that includes assistive, adaptive, and rehabilitative devices for people with disabilities and also includes the process used in selecting, locating, and using them. Assistive technology promotes greater independence by enabling people to perform tasks that they were formerly unable to accomplish, or had great difficulty accomplishing, by providing enhancements to, or changing methods of interacting with, the technology needed to accomplish such tasks. https://en.wikipedia.org/wiki/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 pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party 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 AccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/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 CSSCSS CSS is an acronym for cascading style sheets. This is what controls the design or look and feel of a site.. 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