montroser 2 days ago
Good problem to solve, but this particular solution is a fast path to hell for everyone involved.

You just can't scale text size independently of layout and interface. The size of the text is fundamentally related to the structural layout of the page. The number of columns, the size of images, the relative placement of buttons and UI elements -- it's all inextricably tied to the size of the text.

Good news is that we already have a solution for this: responsive design, aka page zoom. Every serious site already gracefully handles a wide range of viewport widths. When you zoom in, you are simply simulating a narrower viewport width. This type of constraint and flexibility is already well tested. Zooming in makes the text bigger. And, zooming in makes the layout adapt to a single column when that's all that will fit. It all works harmoniously together, because we test and accommodate for all viewport sizes, which is the same as all zoom levels.

The proposal at hand to scale text alone is bad for everyone. Developers now have a geometric set of permutations to test. What about an ultra-wide viewport with large text? What about a small viewport with large text? What about a wide viewport with small text? It's so much that it won't make business sense to invest in all of the testing, and all of the design and implementation work to accommodate all of the cases. And so, it will be bad for end users who will set their text size to their preference, and then find that actually usability and readability are now worse.

In the end the answer is simple: when users set their text size to be larger in the OS, browser vendors should increase the default zoom in browsers. This is already how it works on Windows, and it is definitely the best path to happiness for all.

dfabulich 2 days ago
That's the testing matrix we have to do for iOS and Android apps today. The screen sizes don't go all the way up to ultrawide, but 13" iPad (portrait and landscape) down to 4" iPhone Mini, at every "Dynamic Type" display setting is required.

It's not that tough, but there can be tricky cases.

mananaysiempre 2 days ago
Also with every relevant locale, as English UI strings are usually abnormally short.
mjmas 2 days ago
This is supporting something that already exists for native phone apps. My phone has separate options for display size and text size.

And so I have it set to have smaller buttons but still a normal-size font.

homebrewer 2 days ago
In addition, desktop Firefox has had support for "zoom text only" for about 20 years or so (can be enabled in settings). It works fine.

Don't know about mobile, probably works there too.

montroser 2 days ago
Well, it does what it says, if that's what you mean by "works". But I don't think my grandpa is going to be happy with the results.

Here's NYT with that firefox "zoom text only" enabled: https://i.imgur.com/zp7pDW3.png

See the chopped "rld" on the left? That's the link to the "World" section. To the left of that off the screen should be the "U.S." section. But there's no horizontal scroll bar or any way to get to it, or any way to even know it exists. Categories spill off the right too, and you can't get to those either. This anti-feature, in the name of accessibility has actually just made things worse.

For reference, here's the totally sensible result if you just don't enable "zoom text only": https://i.imgur.com/Kkd5aOu.png

crazygringo 2 days ago
Seriously.

Browsers originally had text zoom -- only text zoom -- until page zoom was invented, I can't remember by which browser. And then page zoom quickly became the "main" zoom mechanism across all browsers because it was obviously so much better -- icons, layout, everything adjusted together. (And for those who remember, when there was only text zoom, it was a common practice/workaround to define everything in em rather than px, precisely to "fake" page zoom with text zoom.)

I'm baffled by the idea of trying to bring text zoom back. Just no, a million times. We tried it. It was bad.

wlesieutre 2 days ago
Page zoom is fine for relatively minor adjustments, but if you're browsing with a high page zoom setting you'll still run into a ton of problems.

Stuff like "page overlays become so large that they overflow the bounds of the screen, but are fixed position so you can't even scroll them to make the X button visible."

Or in the slightly better case, "most of the screen is obscured by the enlarged floating header, the layout of which is totally broken by the relatively narrow viewport relative to content size, and with your large page zoom setting the remaining half of the screen can fit about five words on it at a time."

Either way websites need to do accessibility testing and clearly most of them don't.

Safari has a setting for "Never use font sizes smaller than __" which used in combination with a not as high page zoom setting is a little less likely to make pages completely fucked, because it's only acting on text that was small to begin with.

crazygringo 2 days ago
There's no expectation that sites ought to work perfectly with 500% zoom, even though a browser supports that as a zoom value. The same way there's no expectation they work with a horizontal viewport size of 50px. Because they're the same thing, and when you push any design too far it breaks. That's just reality.

And with page overlays, text zoom isn't necessarily going to fix anything. Sometimes the button to dismiss is at the bottom, and the larger text will just push that off-screen downwards. (I do agree that pop-ups/overlays designed for a screen larger than yours are a problem, but that's often less about zoom than just assuming small/short phone screens no longer exist.)

wlesieutre 18 hours ago
500% maybe not, but I've seen sites blow up at much less drastic zoom levels.

The unfortunate reality of accessibility is that there was no expectation of wheelchair ramps until the ADA forced everyone to quit saying "but ramps cost money and I don't personally need that" and do the right thing, web accessibility may end up requiring the same treatment.

crazygringo 18 hours ago
Remember it's the same as a smaller screen.

If you have vision problems such that sites don't work at the zoom level you need, then you simply need to purchase or use a device with a larger screen. Then the larger zoom level will work, because there's more space for it.

The world adopted responsive design a long time ago to be mobile-friendly. That inherently made page zoom highly effective even at larger levels. If you need to push it to extreme levels, you need to get a larger screen.

And there's always pinch-to-zoom on top if you really need it. Plus screen magnification utilities.

wlesieutre 16 hours ago
"Just get a bigger screen" is such a lame excuse, and it doesn't even work.

Here's what chatgpt.com looks like on an iPhone 17 Pro Max with the page zoom turned up: https://imgur.com/XXweCSj

It's such an absolutely pathetic use of the viewport space. And this is exactly that kind of thing that giving pages separate text scaling awareness instead of only page zoom will be able to improve. Most of the stuff using up the limited relative viewport size did not need to be enlarged.

Insisting that blind people should accept wasting left and right thirds of their screen space (seriously, look at the size of the chat bubble where you can see a tiny slice of it peeking through) on zooming in the white space and just buy bigger devices that don't even exist to accommodate this, all because uniformly blowing up all page elements is easier for developers is… I'll be polite and say it's not something I agree with.

crazygringo 15 hours ago
If that's the level of text size you require, you should be using sites on a large tablet, not a phone. A phone screen isn't large enough for your vision period. This is like expecting a website to be usable on an Apple Watch display. Be reasonable here.

At some point you just have to accept that your vision accommodations need to be met with a combination of hardware and software, not just software alone.

wlesieutre 14 hours ago
Blind people use phones smaller than this with large text all day long and the inability of web developers to accommodate it is an embarrassing failure of web developers and web platforms.

In the ChatGPT example, the entire interface boils down to a scrolling chat history, a text input box, and a send button. It's hard to imagine an interface that would be easier to fit in a small viewport than this. But the current reliance on full page zoom and poor responsiveness to viewport space (maintaining huge side margins in a narrow window) means it sucks.

Their mobile app works fine with large accessibility text sizes (iOS goes up to 310%). There's no fundamental reason the web shouldn't be able to handle an accessible interface with enlarged text equally well. The current state of web accessibility is just bad.

It can be better, but only if people do the work to make that happen. Curb cuts and wheelchair ramps didn't exist until we built them, and they gave a lot of people with mobility limitations the ability to get around independently. Unfortunately it took heavy handed regulation to force the issue, because so much of the population is content to say "I'm not the one in a wheelchair, why should I care about that?"

My hope would be that enough people in tech do care about accessibility and it won't require that level of regulation. And I'm thankful that Chrome is looking at ways to improve the current situation.

crazygringo 12 hours ago
> It's hard to imagine an interface that would be easier to fit in a small viewport than this.

It's a website. We already have responsive design between desktop and mobile. You're essentially asking for a third modality that is essentially purely text and buttons without margins or padding, something that would work for closer to Apple Watch screens. You're showing a case where you need everything 3x larger in each dimension, which gives you nine times less usable space on your screen. Asking interfaces to work in one-ninth the usual space of an already space-constrained phone screen seems unreasonable to me.

If you need 3x magnification in each dimension and want to browse the web, you really just need a larger device. That's an accomodation that exists. Tablets exist. This isn't the equivalent of needing curb cuts and wheelchair ramps, because larger screens are already available for this level of visual disability.

ValdikSS 2 days ago
Oh, and there's TWO page zooms btw: the one you activate with +/- (or ctrl + +/-), and another one available with touchpad pitch-to-zoom / touchscreens (you can't use it on desktops without touchpad/touchscreen).
gary_0 2 days ago
My memory that far back is hazy but I seem to recall being able to do full-page zoom in Opera circa 2003.
fassssst 2 days ago
> This is already how it works on Windows, and it is definitely the best path to happiness for all.

Actually Windows has a newish independent text scale accessibility setting that is different than display scale.

Yea, sometimes you have to update your UI to account for that, but it’s not a big deal most of the time.

https://learn.microsoft.com/en-us/windows/apps/develop/input...

yencabulator 10 hours ago
> Every serious site already gracefully handles a wide range of viewport widths.

... he writes, on a site that forces horizontal scrolling on mobile.

If I make HN font readable size on portrait phone using just zoom, the page is 4 screens wide.

halapro 2 days ago
What's old is new again.

Old timers remember that this was the old way of doing things, until at some point they changed to do full-page zooms, to the joy of developers.

Now they're adding support for this again, but `:root{font-size: 16px}` breaks it, so you're guaranteed to see that in CSS resets everywhere because there's nothing that managers hate more than inconsistencies

"QA user X mentioned that the text overflows when text zoom is at 300%. Fix it."

Cthulhu_ 23 hours ago
> "QA user X mentioned that the text overflows when text zoom is at 300%. Fix it."

We've adopted a stance that functionality trumps design at larger text scaling. Second, overflowing is preferable to truncating (also as per the WCAG, which says you shouldn't truncate / no information should be lost on larger text scales)

montroser 20 hours ago
Yes, functionality trumps design if something has to give -- but what is the text overflowing into? Often it is overflowing into other text, and so now neither is readable. Or it is pushing other content unreachably outside the viewport. In this case, it's a lose-lose situation, in that both functionality and design have suffered.

For example, NYT with 200% text-only scaling: https://i.imgur.com/zp7pDW3.png

yencabulator 10 hours ago
The problem there is trying to fit all the content on a single line. Obviously that's an immovable-object-vs-unstoppable-force scenario. Instead, let the layout elements flow downward.
halapro 23 hours ago
Explain that to the customer. Text looks different in my browser. Fix it. You can only push back so much
david422 2 days ago
> how do we get large text to scale at a lower rate than body text. It's great that the body text can scale up from 16px to 32px, but does heading text need to scale up from 32px to 64px? It's already huge. If you have any thoughts, please do let me know!

Android 14 has this in non-linear text scaling -

> To prevent large text elements on screen from scaling too large, the system applies a nonlinear scaling curve.

https://developer.android.com/about/versions/14/features#non...

qingcharles 2 days ago
I wish Android apps were better citizens when it comes to accessibility. My friend has very poor eyesight and I set his phone up to make things bigger for him, but most of the apps are a horrible janky mess of overlapping everything.

(Also "light mode" apps are painful for him to view, and most of the major apps have skipped out on offering dark mode)

socalgal2 2 days ago
As someone whose eyesight is getting worse, thank you for helping make this happen
nextaccountic 2 days ago
> Text scaling doesn't need to replicate zoom. If you use font-relative units like em and rem everywhere that you set a length, everything will scale up the same way as browser zoom. > Instead, only use font-relative units on things like text, images and icons. You don't need to use it on properties like margin, padding or gap. > If you do that, there's more room for the content, which is especially important on portrait mobile devices.

So, for margin and padding, one should use px? Or is there a better unit?

fleebee 2 days ago
After reading it, I'm still left asking why browsers can't do this for the user on mobile as well. User preferences should be respected by default and not require an opt-in step from the webmaster of all parties.

I tried using a bunch of zoom on my most frequented sites and they mostly worked just fine. At my day job everything is tested to work at 200% zoom as a baseline.

I really don't think we should bend over backwards to cater to accessibility offenders such as LinkedIn.

zamadatix 2 days ago
Most any site should work with zoom. This is about the scale of the text separate from the level of the zoom. The latter breaks a lot of sites because many common layouts assume the layout space for the text will always grow along with the text, as seen in zoom.
ValdikSS 2 days ago
They can, and they do. Opera does great zoom + text reflow since ≈2010 and counting.
londons_explore 2 days ago
I'm pretty sure this will only get supported by perhaps 5% of websites, making the feature effectively 'broken' for the user 95% of the time.
SamBam 2 days ago
These days the vast majority of the (at least, English-speaking) web is only on a few dozen websites. The 80-20 rule would get you pretty far for most users' daily interactions.
avallach 2 days ago
> how do we get large text to scale at a lower rate than body text

Express the header text size with CSS calc function with a sum of em (relative) and px (absolute) values. Depending on their ratio, element will be more or less scalable. 100% em -> scales like body text, 100% px -> no scaling.

pupppet 2 days ago
Why is this set as a meta tag rather than via CSS with html{text-scale:scale} for example?
ameliaquining 2 days ago
The linked explainer [1] gets into this:

"The new CSS env(preferred-text-scale) variable provides a mechanism for authors to respect the user’s text scale setting that they’ve set either in their operating system or web browser settings. Authors can use it to scale the font-size and alter the layout accordingly.

Note: See the env(preferred-text-scale) Explainer [2] for a comparison of the various ways users can scale content and examples of how to use the environment variable.

However, if authors have already used font-relative units like rem and em to conform to the Resize Text guideline, the browser could automatically incorporate the OS-level text scale setting into those font-relative units. This would allow authors to avoid having to determine the precise elements to apply the env() variable to.

We propose a new HTML meta tag that tells the user agent to apply the scaling factor from env(preferred-text-scale) to the entire page. We expect it will become best practice for authors to use this meta tag, just as they would use the viewport meta tag. The environment variable would be reserved for atypical use cases."

There's no need for a text-scale CSS property because font-size already exists. The latter explainer [2] suggests that developers use font-size: calc(100% * env(preferred-text-scale)) to get the desired effect, if they are doing this in CSS rather than with just the meta tag.

[1] https://github.com/w3c/csswg-drafts/blob/main/css-env-1/expl... [2] https://github.com/w3c/csswg-drafts/blob/main/css-env-1/expl...

joshtumath 2 days ago
Actually I don't think the explainer gets into the full story. The reality is it's not CSS's problem. It's the browsers that have historically made text scaling weird on each platform that they support.

And now just like with the viewport meta tag, we need a meta tag to say, 'Stop doing that please. Make the default font size in my CSS work the way it always should have'.

The other reason why the flag can't be in CSS is because it needs to make em and rem units in media queries get affected by the user's text scale. See the explainer for more info on that.

linolevan 2 days ago
Speculation on my part: Your site either supports accessible text scaling, or it doesn't. If only partly supports it – it might as well not at all.
ivanjermakov 2 days ago
Should have been tied to the window.devicePixelRatio instead of another input parameter that breaks the layout for some hidden reason.
halapro 2 days ago
How so? It's already related to `devicePixelRatio` and it's already handled by the browser as a full-page zoom.
rawxtl 24 hours ago
I didn't even realise it was a issue util now. Thinking about it, this should have been done years ago. never the less this is a great step forward and hope get's implemented soon.
feverzsj 2 days ago
Like web frontend dev isn't messy enough.
zarzavat 2 days ago
This is a terrible idea. This meta tag will get copied and pasted by people who don't know what it means and the site will look just fine to the web developer, but whenever someone with larger text size tries to use the site it will be broken.

In other words this is going to make things worse for exactly the group of people it purports to help.

zamalek 2 days ago
I wish this could be met with universal approval, but this is quite a few fingerprinting bits to add to the bucket.
jlarocco 2 days ago
I dont' follow. The argument is that browsers can't respect a user's text size settings because LinkedIn has a terrible design that limits it to using less than 1/3 of the available screen space.

Just one more reason I think the web is a dumpster fire, I guess.

joshtumath 22 hours ago
Well that's just one example. Most websites have problems. Especially on mobile viewports.
kevin_thibedeau 2 days ago
What we need on mobile is the ability to pinch zoom on images to scale the page and pinch zoom on text with font scaling. This needs to work universally without depending on developers to include a CSS magic incantation. It's already ridiculous that a user agent will refuse to zoom at all because of the page design.