5 ms·
> smaller font sizes (14px and below) are bad for accessibility and should not be included as options in the typography scale When improving our accessibility
by jorgesborges 4y ago
> smaller font sizes (14px and below) are bad for accessibility and should not be included as options in the typography scale
When improving our accessibility I noticed that in iOS any font size less than 16px on form inputs will zoom in if selected, which is really annoying as you have to zoom back out to see the page layout normally.
We actually had our :root set to 14px so this happened on every form input across the app. Definitely font sizes below the browser defaults (16px) can cause unexpected issues.
- tatersolid 4y agoSetting your root font size to 14px is the problem. Fix that. Use em/rem units and don’t override the user’s chosen font size.
- jorgesborges 4y agoYeah it was a janky setup. I think the root was 14px which was converted to rem and then multiplied by a scaleMultiplier depending on user settings. As you pointed out the obvious solution was to increase the root size, but that would have significantly changed the UI for a lot of users… so I just targeted all form inputs for webkit only and set the default size in rem using !important to 16px.