Live data from Hacker News

Please stop disabling zoom

matuzo.at

151–160 of 309 posts

Re: Please stop disabling zoom

#151
post #84
post #5

Earlier quoted context omitted.

No. Sometimes it's good to disable zoom (e. g. in web apps that function as a big canvas, like Figma). Pages should use the feature correctly. People shouldn't have to fiddle with browser settings just because someone can't CSS properly.

The user is zooming because what they see is not legible to them. If Figma can't work out how to handle that, that's Figma's failing.

Figma does it correctly, that's the point (they have custom zooming logic) - if user has to fiddle with their zoom-lock settings because of other pages, then pages like Figma which use the feature correctly and for the intended purpose will stop working.

Re: Please stop disabling zoom

#152
post #131

Vision: Game Boy Advance-sized website. Problem: Very tiny. Solution: Scale to viewport in integer increments. Result: https://anaminus.github.io/ This disables zoom. In fact, it actively fights the zoom level to always fit the viewport. Have I committed a great sin?

It's not scaled to the viewport for me. It's centered in the middle of it, but still tiny.

I figured this would happen. I've also committed the even greater sin of testing in only one environment (my own). I guess we don't quite live in the future yet.

Re: Please stop disabling zoom

#153

Earlier quoted context omitted.

I've become "that guy" in presentations who constantly tells people "fonts too small", "can't read cause the contrast isn't enough", etc... My hope over time is that I stop being invited to meetings or people actually take the time to fix their presentations before it is presented to a wider audience.

A simple rule: Minimum font size >= Age of oldest attendee

This doesn't make much sense to me. I have coworkers who are 50+ years old, so are you saying everything should be size 50 font? That seems pretty ridiculous and kind of like mocking them.

Re: Please stop disabling zoom

#154
post #22

My pet theory: I'm pretty sure this is because when HTML5 became a thing, some major tech blog showed us what an HTML5 page would look like (simplified doctype, meta charset) and they included the viewport settings that disabled zoom. Then pretty much everyone copied from these guides, and here we are. I remember I had used HTML5 skeleton templates for a while before I learned that the "maximum-scale=1, user-scalable…

Almost all major template for JS frameworks these days include that line. And there are tons of guides that specify adding that in. I get why it's there, if you're building a PWA that is supposed to mimick a mobile app, you have to enable that to override some annoying mobile browser behaviors like zooming on an input. The problem is that the above scenario is about the only time you would want to set the viewport in…

> override some annoying mobile browser behaviors like zooming on an input.

Yep, I've seen some people disable zoom in their webpages specifically to prevent Safari from auto-zooming all over the place as the user moves from this to that input. It gets really annoying if you have anything but the simplest form. And what webpage doesn't have at least one form on it, even just the search box?

I fully agree with OP that disabling zoom is wrong. I also think it's wrong for browsers to mess with the zoom level without the user's instruction.

Almost every weird workaround we still have today in webdev was originally written to compensate for inconsistent browser implementation of some standard. In the past, IE was the one that always did something weird. Now it's Safari. Until browsers stop trying to pretend that they know better than both the developer and the user, somebody somewhere will keep writing these workarounds that then stick around in boilerplates and tutorials for years.

Re: Please stop disabling zoom

#155
post #132

Earlier quoted context omitted.

We need to admit that "modern" web pages are a thing. If we keep ignoring most of the web because "they are doing it wrong" then accessibility will never be solved.

It seems to me you can build quite complex things that will be accessible by default with the web platform. IF don't fight it and if you respect semantics and progressive enhancement / beautiful degradation. You get so much by default: legible colors and font sizes, tabbed page navigation, alt texts, clickable labels, zoomable interface... When you embrace the platform and its spirit, you get accessible results quite…

I'm just trying to step back and look at things objectively. Instead of saying "arg developers are just stupid" I'm trying to analyze why these mistakes are made so frequently (even at big corporations with lots of funding).

There are native UI frameworks where this is not nearly as big of an issue.

Too much freedom perhaps? Should you even be able to give a div an onclick handler?

What about inputs? Why do developers have to make custom inputs because the core ones are severely lacking? That's where accessibility goes wrong. Because core functionality is terrible and needs to be augmented with richer functionality (but terrible from an accessibility perspective).

There is something fundamental about this platform that does not naturally encourage good behavior. All you have to do is look at the evidence.

As an dumb little example, it's not even obvious that making a div a button is bad unless you know that it is. The platform doesn't guide you at all. It has an onClick handler the same as a button. Little attempt is made to differentiate the two from an API perspective.

I could give countless other examples, but I think I have demonstrated what I am getting at.

Re: Please stop disabling zoom

#157
Don't disable zoom, and stop fucking with scrolling.

Browser scrolling works fine. You don't need to try to re-implement smooth scrolling, it never works and makes my scrolling bounce around like mad.

One website override my scrolling speed entirely. I like it so that 1 click = 2 lines of scrolling. That site changed it to that 1 click = 1/2 line, but for some reason the web dev thought they knew better than my preferences.

Re: Please stop disabling zoom

#159

Vision: Game Boy Advance-sized website. Problem: Very tiny. Solution: Scale to viewport in integer increments. Result: https://anaminus.github.io/ This disables zoom. In fact, it actively fights the zoom level to always fit the viewport. Have I committed a great sin?

Not sure what you're going for, but this probably isn't it.

https://imgur.com/a/Kgktbvs

Re: Please stop disabling zoom

#160

Earlier quoted context omitted.

I've become "that guy" in presentations who constantly tells people "fonts too small", "can't read cause the contrast isn't enough", etc... My hope over time is that I stop being invited to meetings or people actually take the time to fix their presentations before it is presented to a wider audience.

A simple rule: Minimum font size >= Age of oldest attendee

What about giving websites and web apps the ability to detect the font size preference of the user to automatically adjust the font size?

Just like native apps do...?

Post reply on HN