From 444a4b9bbff779cfff4eac0a1a9b1b8ac9fe56fa Mon Sep 17 00:00:00 2001 From: jjalbuenacabuyao Date: Mon, 2 Jun 2025 21:25:07 +0800 Subject: [PATCH] fix(material/core): body-medium and body-small line heights are not accessible Fixes an accessibility issue on body-medium and body-small line heights. According to criterion 1.4.12 of WCAG 2.1, line height (line spacing) must be least 1.5 times the font size. To meet the criterion, body-medium line height is set to 22px (1.375rem) and body-small line height is set to 18px (1.125rem). Ref: https://www.w3.org/WAI/WCAG21/Understanding/text-spacing.html Fixes #31176 --- src/material/core/tokens/m3/_md-sys-typescale.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material/core/tokens/m3/_md-sys-typescale.scss b/src/material/core/tokens/m3/_md-sys-typescale.scss index 377a33ed66e0..a0596a7491e9 100644 --- a/src/material/core/tokens/m3/_md-sys-typescale.scss +++ b/src/material/core/tokens/m3/_md-sys-typescale.scss @@ -24,13 +24,13 @@ $_alternate-tokens: false; body-large-weight: $regular, body-medium: $regular 0.875rem #{'/'} 1.25rem $plain, body-medium-font: $plain, - body-medium-line-height: 1.25rem, + body-medium-line-height: 1.375rem, body-medium-size: 0.875rem, body-medium-tracking: 0.016rem, body-medium-weight: $regular, body-small: $regular 0.75rem #{'/'} 1rem $plain, body-small-font: $plain, - body-small-line-height: 1rem, + body-small-line-height: 1.125rem, body-small-size: 0.75rem, body-small-tracking: 0.025rem, body-small-weight: $regular,