The accessibility fix that locked users out of login
Symptom
At the largest iOS accessibility text size (AX5), screens fragmented and the login OTP controls were pushed out of reach. Login was impossible at AX5.
Regression guard
No automated guard:An invariant comment in Text.tsx explains the fontScale-squared failure, and the OTP clamp bounds the control that was pushed off screen. No automated test renders login at AX5: the font-scale tests written since cover other components, not the Text primitive or the OTP screen.
The whole story: My audit agents wrote the bug; a simulator screenshot found it
Diff and files
// src/design-system/components/Text.tsx
// BEFORE: RN already scales lineHeight by fontScale,
// so this multiply compounds it to fontScale^2 (about 9.7x at AX5).
-const scaledLineHeight =
- typeof variantStyle.lineHeight === 'number'
- ? { lineHeight: Math.round(variantStyle.lineHeight * PixelRatio.getFontScale()) }
- : null;
- style={[ variantStyle, scaledLineHeight, { color: resolvedColor } ]}
// AFTER: drop the manual multiply (and the PixelRatio import) entirely.
+ // Do NOT scale lineHeight by PixelRatio.getFontScale(): RN's
+ // allowFontScaling already scales BOTH fontSize and lineHeight.
+ style={[ variantStyle, { color: resolvedColor } ]}Files: src/, src/, src/