Replacement record: Color, contrast, and typography
This record explains how two Drupal 7 theming pages were consolidated into the proposed current documentation page, Color, contrast, and typography. It also provides a short archival notice for each Drupal 7 page.
Pages replaced
| Drupal 7 page | Disposition |
|---|---|
| Improving readability with fonts and typography | The durable guidance on real text, legible type, resizing, and alignment was retained and corrected. Motion guidance was assigned to the interactive-components page. |
| Specifying colors and contrast for accessibility | The text-contrast ratios were retained. The page was updated from WCAG 2.0 to WCAG 2.2 and expanded beyond text contrast. |
What was retained
- Use real text rather than images of text.
- Choose legible type and provide sufficient text contrast.
- Allow people to resize text.
- Avoid extended passages of fully justified text.
- Use 4.5:1 for normal text and 3:1 for large-scale text at WCAG Level AA.
- Measure contrast instead of relying on appearance or assumptions about color vision.
What was updated or added
WCAG 2.2 requirements
The old contrast page covered only WCAG 2.0 text contrast. The replacement keeps the correct minimum ratios and adds:
- non-text contrast for controls, states, focus indicators, and meaningful graphics;
- use of color requirements;
- text spacing;
- 200% text resizing;
- 400% zoom and reflow; and
- testing of dynamic component states.
AA requirements and AAA aspirations
The replacement does not describe AAA as "necessary" under loosely defined conditions. For a project targeting AA, enhanced text contrast, the visual-presentation provisions, and other AAA criteria are identified as aspirational. User research or a product policy may set a stronger requirement, but that is distinct from the WCAG AA conformance target.
Complete theme states
The replacement covers default, hover, focus, active, visited, selected, disabled, and error states. It adds CKEditor output, status messages, administrative elements in the front-end theme, third-party modules, gradients, images, and transparency. This replaces palette-level testing with rendered-component testing.
Light, dark, and forced-color modes
The new page adds prefers-color-scheme, color-scheme, light-dark(), contrast-color(), and forced colors. These are presented as implementation mechanisms, not conformance guarantees. The page explicitly warns that contrast-color() can produce inadequate text contrast on mid-tone backgrounds and that every resulting state must still be measured.
No Drupal 11 color values or theme-specific CSS were copied into the page. Drupal core has several themes with different visual systems, so presenting one core theme's palette as the Drupal implementation would be misleading and difficult to maintain.
Current typography guidance
The replacement avoids prescribing one font category or family. It directs authors to assess character differentiation, weight, language support, resizing, line spacing, line length, and real content. It also distinguishes WCAG text-spacing test values from recommended default design values.
Repeatable testing
The test list covers computed colors, component states, color-independent meaning, light and dark modes, forced colors, text-spacing overrides, text resizing, reflow, languages, and real content. Automated results are treated as evidence for the combinations they evaluate, not proof that every state meets WCAG.
What was removed or corrected
| Old material | Change and reason |
|---|---|
| The Vischeck statistic that roughly one in twenty people has a color vision deficiency | Removed. A dated prevalence claim is unnecessary to explain the requirement and adds a maintenance burden. |
| The claim that black text on white is the most readable combination for most people | Removed. User needs vary, and some people need different color combinations. The durable requirement is sufficient contrast plus support for user preferences. |
| The Drupal 7 "accessibility gate" framing | Removed. The current page states WCAG requirements directly and does not imply that one automated gate establishes accessibility. |
| A long catalogue of Flash, Adobe AIR, Firefox-extension, Windows, and abandoned contrast tools | Removed. Most entries are obsolete. Tool lists age quickly and belong in maintained testing resources, not durable implementation guidance. |
| Enhanced contrast described as necessary for urgent headings, small text, glare, or an audience with poor vision | Corrected. WCAG enhanced contrast is Level AAA. It is aspirational under an AA target unless the product sets a stronger requirement based on research or policy. |
| A preferred list of sans-serif fonts, including Verdana, Tahoma, Trebuchet MS, and Bitstream Vera Sans | Removed. No single font category or old system-font list guarantees legibility across languages, devices, and user settings. |
| A 9-pixel minimum attributed to W3C | Removed. WCAG has no minimum body-text size. The current requirements concern contrast, resizing, spacing, and reflow. |
| The claim that pixels and other absolute units must always be avoided because Internet Explorer 6 and 7 could not resize them | Removed. The browser limitation is obsolete. Relative units remain useful, but conformance depends on actual resizing and reflow. |
| Internet Explorer-specific stylesheets and the instruction not to set text below 75% | Removed. These are unsupported browser workarounds and arbitrary thresholds. |
| The suggestion to make small text bold as a contrast remedy | Removed. Bolding text does not replace adequate font size or required foreground-to-background contrast. |
| A line-height range presented as particularly suitable for people with dyslexia | Rewritten. A unitless value near 1.5 is presented only as a starting point. The correct result depends on the typeface, language, line length, and user settings. |
| The categorical claim that screen readers pronounce all-capital text as individual letters | Removed. Pronunciation varies by text, language, screen reader, and voice settings. Long all-capital passages are discouraged for visual readability. |
| Blinking and moving text guidance | Moved to the planned Accessible JavaScript and interactive components page. Pausing, stopping, animation, motion preferences, and flashing thresholds are behavioral requirements and should not be maintained in two places. |
| An old image-replacement technique for graphical headings | Removed. Use real text. Current exceptions and alternative-text requirements are covered by Accessible images and media. |
| Malformed list and definition-list markup in the typography page | Removed during restructuring. The replacement uses valid headings, paragraphs, and lists. |
Content mapping
| Current section | Primary source material |
|---|---|
| Meet minimum text contrast | Specifying colors and contrast, updated from WCAG 2.0 to WCAG 2.2. |
| Provide non-text contrast and Do not use color alone | New coverage needed for current WCAG and component design. |
| Design complete color systems | Palette-selection intent from the old contrast-tool section, rewritten for semantic tokens and rendered states. |
| Support light and dark color schemes | New coverage for current CSS and user preferences. |
| Respect forced colors and user styles | New coverage for forced-color environments and native semantics. |
| Choose legible typography | Typography source page, with font-family, font-size, and screen-reader claims corrected. |
| Allow text-spacing overrides | Current WCAG requirement replacing fixed spacing prescriptions. |
| Support resizing and reflow | Text-resizing intent from the typography page, expanded for WCAG 2.2 reflow. |
| Test color and typography | Old tool intent converted into a maintainable, repeatable manual and automated test list. |
Copy-ready archival notices
Improving readability with fonts and typography
<p><strong>This Drupal 7 page is no longer supported.</strong> See <a href="/docs/getting-started/accessibility/color-contrast-and-typography">Color, contrast, and typography</a> for current guidance. Drupal 7 reached end of life on 5 January 2025. See <a href="/about/drupal-7/d7eol/partners">Drupal 7 support options</a> if you still maintain a Drupal 7 site.</p>
Specifying colors and contrast for accessibility
<p><strong>This Drupal 7 page is no longer supported.</strong> See <a href="/docs/getting-started/accessibility/color-contrast-and-typography">Color, contrast, and typography</a> for current guidance. Drupal 7 reached end of life on 5 January 2025. See <a href="/about/drupal-7/d7eol/partners">Drupal 7 support options</a> if you still maintain a Drupal 7 site.</p>
Sources checked
- W3C: Understanding Contrast (Minimum)
- W3C: Understanding Contrast (Enhanced)
- W3C: Understanding Non-text Contrast
- W3C: Understanding Use of Color
- W3C: Understanding Text Spacing
- W3C: Understanding Resize Text
- W3C: Understanding Reflow
- W3C: Understanding Visual Presentation
- MDN: forced-colors
- MDN: prefers-color-scheme
- MDN: light-dark()
- MDN: contrast-color()