Absolute Font Sizes

Absolute Font Sizes

WCAG Focus: WCAG 1.4.4 (AA)

Hardcoding typography in legacy pt units, inline fixed sizes, or outdated HTML <font size="…"> tags can prevent users who change their browser’s default base font size from scaling text comfortably up to 200%.

Why This Pattern Violates WCAG

WCAG 1.4.4 Resize Text (Level AA) requires that text can be resized up to 200% without assistive technology and without loss of content or functionality.

Relative units like rem, em, and % honor user-configured browser root font preferences automatically.

Code Comparison

Inaccessible Absolute Font Sizing

<p style="font-size: 11pt;">Terms and conditions apply.</p>

Compliant Relative Typography Units

<p style="font-size: 1rem; line-height: 1.6;">Terms and conditions apply.</p>

How to Fix It in WordPress

  • Replace pt, cm, and fixed <font> attributes with rem, em, or % units in theme CSS and block presets.
  • Test every WordPress layout at 200% browser zoom and increased browser default font size to verify nothing overlaps or clips.

Finding This Issue Automatically

Pasted content from Word documents and older theme stylesheets frequently leave behind absolute pt or <font> declarations. The WP ADA Compliance Check plugin flags absolute font sizes across your WordPress site and will automatically fix the issue by converting absolute font sizes in content to relative sizes (% or ems).

WCAG References & Supporting Materials

WCAG Success Criteria

Supporting Documentation & Guides

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide