HeroUI Version
2.7.6
Describe the bug
🐛 Input font-size causes iOS zoom issue on focus (accessibility concern)
Summary:
On iOS devices, inputs with font-size smaller than 16px trigger automatic zoom when focused. HeroUI components use text-sm (14px) by default for form inputs, which leads to this behavior. This creates an inconsistent and frustrating user experience on mobile Safari.
Why it matters:
- The zoom behavior is unintended, and breaks layout/UX on iOS.
- A common workaround is to disable scaling via
maximum-scale=1 or user-scalable=no, but that violates accessibility best practices and WCAG 2.1 guidelines.
- Increasing input font-size globally to 16px does prevent zooming, but leads to inconsistent input styling, especially when surrounded by other text using
text-sm.
Context:
Possible workaround:
We can manually override font-size: 16px on input, but this breaks visual consistency unless carefully tuned per component.
Let me know if you'd like me to provide a PR or further testing.
Thanks for your great work on HeroUI!
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Use any
input component from HeroUI (e.g. in a login form).
- Load the page on an iPhone in Safari.
- Tap into an input field.
- Safari zooms in — the layout shifts, and it doesn’t zoom out automatically after blur.
Expected behavior
Inputs in HeroUI should not trigger unexpected zooming on iOS when focused. Ideally:
- Input fields should use at least
16px font-size on mobile devices to prevent auto-zoom.
- This should be achieved without requiring developers to disable user scaling, as that breaks accessibility.
- The design should remain visually consistent with the rest of the UI — ideally by only adjust
Screenshots or Videos
No response
Operating System Version
iOS
Browser
Safari
HeroUI Version
2.7.6
Describe the bug
🐛 Input font-size causes iOS zoom issue on focus (accessibility concern)
Summary:
On iOS devices, inputs with font-size smaller than
16pxtrigger automatic zoom when focused. HeroUI components usetext-sm(14px) by default for form inputs, which leads to this behavior. This creates an inconsistent and frustrating user experience on mobile Safari.Why it matters:
maximum-scale=1oruser-scalable=no, but that violates accessibility best practices and WCAG 2.1 guidelines.text-sm.Context:
Possible workaround:
We can manually override
font-size: 16pxoninput, but this breaks visual consistency unless carefully tuned per component.Let me know if you'd like me to provide a PR or further testing.
Thanks for your great work on HeroUI!
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
inputcomponent from HeroUI (e.g. in a login form).Expected behavior
Inputs in HeroUI should not trigger unexpected zooming on iOS when focused. Ideally:
16pxfont-size on mobile devices to prevent auto-zoom.Screenshots or Videos
No response
Operating System Version
iOS
Browser
Safari