Skip to content

[BUG] - Input font-size causes iOS zoom issue on focus (accessibility concern) #5326

Description

@Junk-debug

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

  1. Use any input component from HeroUI (e.g. in a login form).
  2. Load the page on an iPhone in Safari.
  3. Tap into an input field.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions