On iOS, there is a setting for Text Size. I’ll do a video here for the current version of iOS (17.5.1) to be clear:
As far as I ever knew, that controlled the text size on the OS itself and native apps. It didn’t effect websites. I think that’s largely true, but I just learned you can honor the setting on the web as well. Craig Hockenberry wrote about this in Dynamic Type on the Web:
This is a big win for accessibility: many folks make this adjustment on their device to match their abilities. Just because you can read a tiny font doesn’t mean that I can. It also is a win for consistency: my site’s font size matches the other text that a visitor sees on their device.
I tend to agree. While I think few sites will actually do this, it’s nice when they do. It’s a little similar to using font family keywords like system-ui which, when supported, will match the operating system’s font, only this is even better as it’s an accessibility thing not just aesthetic.
Here’s the the trick:
html {
/* Default, relative sizing so other users can adjust in their own way */
font-size: 1em;
/* If supported, inherits the iOS font settings */
font: -apple-system-body;
/* Override the font-family if you don't want system-ui */
font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}Code language: CSS (css)
Here’s an example page.
And here’s a video showing it working:
I haven’t actually done it yet on a production project, so I can’t entirely vouch for it, but it seems safe to me and like a good idea. I’ll likely give it a go in the future.
I tried this on my own site when Craig posted about it originally. The problem I found is that this also applies on macOS, and I’m not sure setting the “Text Size” in Settings has any effect. The default is 13px, which is far too small for desktops, I think anyway.
I found increasing text size too much on a iPad or iPhone with Safari many web sites can’t display properly some things overlap. Ads tend to cover up text and other content just doesn’t resize properly. Sadly most sites gave up on supporting both a desktop site and a mobile site and with web creators trying to put as much content and ads on a page the end result is a poor experience on a smaller screen. No good choice you either endure bad rendering with larger text or face smaller text so page displays as it does on a larger screen.