Skip to content

fix(a11y): use rem-based font-size in markdown.reset.css (WCAG 1.4.4)#3430

Open
bilal-karim wants to merge 1 commit into
mainfrom
a11y/markdown-reset-rem-font-size
Open

fix(a11y): use rem-based font-size in markdown.reset.css (WCAG 1.4.4)#3430
bilal-karim wants to merge 1 commit into
mainfrom
a11y/markdown-reset-rem-font-size

Conversation

@bilal-karim
Copy link
Copy Markdown
Member

@bilal-karim bilal-karim commented May 22, 2026

Summary

  • Converts hardcoded font-size: 14px / line-height: 20px in src/markdown.reset.css to 0.875rem / 1.4 (unitless) so server-rendered markdown text scales with Firefox text-only zoom and user font-size preferences.
  • 0.875rem = 14px at the default 16px root, so visible rendering at 100% zoom is identical to today.

Audit context

  • WCAG 2.2 SC 1.4.4 Resize Text (Level AA) — Moderate severity.
  • Issue file: audit-output/issues/1.4.4-markdown-reset-rem.md.
  • Affects users of Firefox's "Zoom Text Only" mode on /render?… server-rendered markdown surfaces.

Test plan

  • Visual: open any route using /render and confirm rendered markdown looks unchanged at 100% zoom.
  • Firefox → View → Zoom → Zoom Text Only → Cmd+= to 200%. Confirm markdown text scales proportionally.
  • Chrome → chrome://settings/fonts → set default font size to 24px → confirm rendered markdown scales accordingly.

🤖 Generated with Claude Code

…wn reset

Firefox's text-only zoom does not scale CSS pixel values, so the
hardcoded 14px/20px in markdown.reset.css fails WCAG 1.4.4 (Resize
Text) for that browser preference. Converting to 0.875rem / 1.4
preserves the visible-at-100% rendering (0.875 * 16 = 14px) while
allowing text to scale with user font-size preference and
text-only zoom.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bilal-karim bilal-karim requested a review from a team as a code owner May 22, 2026 00:18
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment May 22, 2026 12:19am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant