You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected font size for custom select control on mobile screens #69113
There is an inconsistent font size behavior in the custom select control component on mobile screens (below 600px). While most text elements maintain a 13px font size, the selected text in the dropdown displays 16px. This inconsistency creates visual misalignment and poor user experience.
Problems with this inconsistency:
Creates visual disruption and inconsistent typography hierarchy
Dropdown options remain at 13px while only the selected text becomes 16px
No clear UX rationale for highlighting just this particular text element
Breaks visual consistency with other form controls and text elements
Makes the interface feel less polished and professional
While 16px is a common default for body text on mobile devices, dropdowns, and secondary UI elements typically follow the same size as surrounding text to maintain visual harmony. I understand 16px is better for readability, but if only the dropdown retains it while others shrink, it contradicts consistent accessibility practices.
This is a conversation starter and I still think this needs design feedback moving forward and also some accessibility insights. Also, this was added in #22329
Step-by-step reproduction instructions
Open any page/post with a custom select control component
View the page on a mobile device or screen width below 600px
Observe the font size of the selected text in the dropdown
Compare it with other text elements and dropdown options
Screenshots, screen recording, code snippet
Screen.Recording.2025-02-10.at.13.15.06.mov
Environment info
WordPress version: 6.7.1
Gutenberg version: 20.2.0
Theme: Emptytheme 1.0
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Please confirm which theme type you used for testing.
I have created a PR (#69114) that demonstrates the expected behavior and proposes a potential fix for this inconsistency.
The PR removes the mobile-specific font size override to maintain consistent typography across all screen sizes. However, I would appreciate both design and development feedback on this approach, as this is meant to start a conversation about the best way to handle font sizing in our mobile UI components.
From what I understand, the current font size is intentional, to prevent zoom in mobile Safari (Example: #27405).
Even in core, the font size of all form elements is consistent at 16px for mobile layouts.
@WordPress/gutenberg-components Regarding font sizes in mobile layouts, I would like to confirm if the 16px font size of the InputControl is intentional and still a valid design.
Yes, this is a widely-used technique to avoid zoom on focus in iOS Safari, and is still relevant. We could potentially talk about visual consistency across components, but I believe that discussion would be whether or not we should upsize all control component font sizes to 16px on mobile, rather than removing the 16px rule.
Activity
himanshupathak95 commentedon Feb 10, 2025
I have created a PR (#69114) that demonstrates the expected behavior and proposes a potential fix for this inconsistency.
The PR removes the mobile-specific font size override to maintain consistent typography across all screen sizes. However, I would appreciate both design and development feedback on this approach, as this is meant to start a conversation about the best way to handle font sizing in our mobile UI components.
t-hamano commentedon Feb 10, 2025
From what I understand, the current font size is intentional, to prevent zoom in mobile Safari (Example: #27405).
Even in core, the font size of all form elements is consistent at 16px for mobile layouts.
t-hamano commentedon Feb 20, 2025
@WordPress/gutenberg-components Regarding font sizes in mobile layouts, I would like to confirm if the 16px font size of the
InputControlis intentional and still a valid design.ciampo commentedon Feb 26, 2025
We don't currently have the capacity to investigate deeply, but as you also mentioned, it seems like the 16px size was intentional.
I imagine this would warrant some investigation from @WordPress/gutenberg-design too, although I'm not sure they'll have capacity either.
mirka commentedon Feb 28, 2025
Yes, this is a widely-used technique to avoid zoom on focus in iOS Safari, and is still relevant. We could potentially talk about visual consistency across components, but I believe that discussion would be whether or not we should upsize all control component font sizes to 16px on mobile, rather than removing the 16px rule.
t-hamano commentedon Mar 2, 2025
Thanks everyone for your feedback! Let's close this issue.
@himanshupathak95 If this discussion is necessary, let's submit a new issue.