Const
This rule matches to a SwiftUI view that uses a standard font modifier, like .font(.body). The transformation replaces the standard font modifier with a static font size modifier, which disables the support for Dynamic Type.
.font(.body)
Before:
Text("Pineapple") .font(.body) Copy
Text("Pineapple") .font(.body)
After:
Text("Pineapple") .font(.system(size: 17)) Copy
Text("Pineapple") .font(.system(size: 17))
Applicable WCAG Success Criteria:
Related documentation:
This rule matches to a SwiftUI view that uses a standard font modifier, like
.font(.body)
. The transformation replaces the standard font modifier with a static font size modifier, which disables the support for Dynamic Type.Before:
After:
Applicable WCAG Success Criteria:
Related documentation: