News for hackers. Stuff that matters.
Re:My Current HTML Boilerplate by dheera on Tuesday April 27, 2021 @03:57AM (#26953247)
> <meta name=viewport content="width=device-width,initial-scale=1">

This is a cat and mouse game. iOS 14 doesn't respect user-scalable=no or maximum-scale, unfortunately.

What you need to do is this now, if you don't want the web browser to respond to scaling (and as much as the idiots at Apple love their high horses, there are actual use cases for this, including when you are building a webapp or when you are building a web page with your own pinch zoom logic):

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <style>body { touch-action: pan-x pan-y; }</body>
Basically, Apple tries hard to break HTML5 apps at every new iOS release.
Re:My Current HTML Boilerplate by hvdijk on Tuesday April 27, 2021 @04:15AM (#26953361)
Are you surprised? If every damn website out there starts copying and pasting the same thing regardless of whether it makes sense, and it makes the iOS user experience worse as a result, of course they're going to change things. Their priority should be their users. It sucks for those that actually have a valid reason for it but there's no way to separate those automatically.
Re:My Current HTML Boilerplate by dheera on Tuesday April 27, 2021 @04:52AM (#26953584)
The problem is the OS zooming fights against pinch zooming that you may implement inside your webapp's logic, especially for non-static content (maps for example), multi-finger games where two touches don't signify a zoom, etc. They just broke the UX of a whole bunch of websites.

When will we ever have HTML5 apps that match native apps? When they actually let HTML5 apps do what native apps do, like multitouch without triggering a default action.

Re:My Current HTML Boilerplate by hvdijk on Tuesday April 27, 2021 @06:20AM (#26954087)
No, that's not the problem. Remember, developers are a minority, users are the majority, so making things work well for users takes priority over making things work well for developers. When functionality that's useful for webapps is misused for websites where it has no place and where it breaks the user experience, the only way to improve things for users is to make things harder for developers.
Re:My Current HTML Boilerplate by bryanrasmussen on Tuesday April 27, 2021 @07:37AM (#26954574)
developers make the things the majority use, if you make things worse for developers they have a harder time making things that work well for the user, when that happens they will look to misuse functionality to improve things for their users. The only way to improve things for users is to make things easier for developers.
Re:My Current HTML Boilerplate by hvdijk on Tuesday April 27, 2021 @08:03AM (#26954766)
There are good developers who try to improve things for their users. There are also many developers who don't and ruin it for the rest.
Re:My Current HTML Boilerplate by KingOfCoders on Tuesday April 27, 2021 @11:59AM (#26957702)
Do they earn 30% from HTML5 apps?
Re:My Current HTML Boilerplate by sgc on Tuesday April 27, 2021 @10:08AM (#26956035)
The OS or browser should not just take over one of the primary means of interacting with an app and effectively disable it for any other use. You might as well just pull those gestures out of the specs at that point. The point of an os or browser is to get out of the way, not be omnipresent. It's extremely patronizing and cripples important functionality for likely millions of sites.
Re:My Current HTML Boilerplate by anoncake on Thursday April 29, 2021 @04:30PM (#26986314)
The browser is the app.
Re:My Current HTML Boilerplate by sgc on Thursday April 29, 2021 @11:40PM (#26989642)
The web app is the app. A browser is a mini OS at this point.
Re:My Current HTML Boilerplate by anoncake on Friday April 30, 2021 @07:58AM (#26992289)
That's what web devs like to pretend. Then they are surprised when browser developers continue developing their browsers.

If you want to develop an app, develop an app, not a website. Use Electron or its mobile equivalents if you must.

Re:My Current HTML Boilerplate by sgc on Friday April 30, 2021 @10:19AM (#26993800)
So you are saying that pinch and double tap should just be removed from js specs because one company arbitrarily decided you can't use them anymore. Whatever.

Also, MS office and Adobe are web apps and far more complex than almost any "real apps" out there. It's completely untrue that web apps are not apps.

Re:My Current HTML Boilerplate by anoncake on Friday April 30, 2021 @02:07PM (#26997088)
No, I think JS as a whole should be removed completely independently of what any company decided. Websites in general aren't trustworthy, which means they can't be trusted to determine the browser's behaviour.

> Also, MS office and Adobe are web apps and far more complex than almost any "real apps" out there. It's completely untrue that web apps are not apps.

You can pretend they are until someone takes away your toys. Then, suddenly, your "app" cannot even process its own input. Or access the clipboard. Or do any of the other things that websites just aren't trustworthy enough for.

Re:My Current HTML Boilerplate by sgc on Saturday May 01, 2021 @11:40AM (#27007161)
There is nothing that makes an installed app, with higher permissions, more trustworthy than a web app. Getting rid of js altogether is just throwing away the web to make it something poorly performing and requires sending all data back to the server - so not really a serious option. Browsers only exist to allow interaction with websites, and as such they should follow specs and allow them to be used. Websites are more important than browsers by definition.
Re:My Current HTML Boilerplate by anoncake on Sunday May 02, 2021 @10:06PM (#27020923)
> There is nothing that makes an installed app, with higher permissions, more trustworthy than a web app.

Yes, there is. The fact the user has installed it.

> Getting rid of js altogether is just throwing away the web to make it something poorly performing and requires sending all data back to the server - so not really a serious option.

Not the web, just webapps. The web will perform better afterwards.

> Browsers only exist to allow interaction with websites, and as such they should follow specs and allow them to be used.

Yes, but those specs have to be sane. Which means even a completely untrusted party – that's what a random website is – cannot abuse them.

> Websites are more important than browsers by definition.

Nonsense, either is useless without the other. Websites are content, browsers define how they're viewed.

Re:My Current HTML Boilerplate by KingOfCoders on Tuesday April 27, 2021 @11:53AM (#26957635)
At what point do they think my English "makes the iOS user experience worse" and change the text between two <div>s?
Re:My Current HTML Boilerplate by ericbarrett on Tuesday April 27, 2021 @04:16AM (#26953366)
> iOS 14 doesn't respect user-scalable=no

Best change made in Safari in a long time. My eyesight is going and unzoomable websites were a serious accessibility issue.

Re:My Current HTML Boilerplate by dheera on Tuesday April 27, 2021 @05:06AM (#26953663)
At the same time, they created accessibility issues on lots of other websites. Games that need multitouch, photo galleries that implement their own pinch zoom and progressive higher res image loading logic, and lots of other things.
Re:My Current HTML Boilerplate by anoncake on Tuesday April 27, 2021 @05:22AM (#26953734)
Then websites just cannot use that feature. Zoom is necessary for accessibility, period. Being able to implement games as websites isn't. If you want to control the UI, write an app.
Re:My Current HTML Boilerplate by maple3142 on Tuesday April 27, 2021 @06:15AM (#26954054)
But not everyone wants to give money to apple to be able to deploy their apps, so the "sensible" way is to use hacks[1] to have a normal html5 behavior.

[1]: https://stackoverflow.com/q/37808180/6885801

Re:My Current HTML Boilerplate by Spivak on Tuesday April 27, 2021 @11:53AM (#26957634)
I'm sympathetic to the argument that you shouldn't have to pay to play on iOS devices but that doesn't mean that the browser has to cater to every possible use-case especially when that use-case hurts accessibility for almost all real web pages if used.

If you give web developers any way to disable zoom they will disable zoom whether it's appropriate or not. With an app that gets human reviewed you can make rules like "this feature can only be used for full-screen games" but not on the web where there's one set of rules for everyone.

Re:My Current HTML Boilerplate by dheera on Tuesday April 27, 2021 @02:42PM (#26959798)
No, it's shitty developers that hurt accessibility. There are so many other worse ways to wreck accessibility than disabling zoom, including popup modals, grossly large banner ads, JS that consumes CPU and huge amounts of bandwidth, supporting only English, putting text in images without alt text, hard-to-read font choices, and so on. People do all of the above. There are good devs and crappy devs. If a website is made by crappy devs it will naturally lose reader interest.

There are actual accessibility reasons for wanting to take control of pinch zoom behavior. As long as I'm actually catering to accessibility, if I have to be forced to use the OS pinch zoom to do that it's going to be LESS accessible. The OS pinch zoom only works for text and static 2D images and nothing else. If you try to OS-pinch-zoom a 3D object on a web page, it zooms the whole UI and not the object. That's a major accessibility problem for say a website that offers 3D models.

And no, I don't think "create an app" is the answer as another comment said. I want LESS apps, LESS spyware, and more in-browser, fully-featured, perfect mobile experiences designed in HTML5 because it's MUCH harder to invade privacy with HTML5 than it is with a native app, and if Apple would stop compromising HTML5 features, a huge number of mobile apps can be implemented in it.

Re:My Current HTML Boilerplate by anoncake on Wednesday April 28, 2021 @03:35AM (#26966756)
> If you try to OS-pinch-zoom a 3D object on a web page, it zooms the whole UI and not the object. That's a major accessibility problem for say a website that offers 3D models.

Why doesn't it zoom the object along with the rest of the page?

Re:My Current HTML Boilerplate by CRConrad on Wednesday April 28, 2021 @07:17PM (#26975457)
Probably meant "it zooms the whole UI and not just the object". (WAG.)
Re:My Current HTML Boilerplate by anoncake on Wednesday April 28, 2021 @07:44PM (#26975648)
Sounds like the expected behavior to me.
Re:My Current HTML Boilerplate by hnedeotes on Tuesday April 27, 2021 @12:47PM (#26958385)
I'm not even arguing if zoom is or not necessary but this kind of thought doesn't make sense for me anywhere else than when a feature can compromise a user device.

If a website borks its usability/accessibility you as a user can decide not to use it. If it's a public service or a company there will be for sure pressure for it to conform to whatever accessibility standard is deemed appropriate. Developers in those situations will have to do the work they are hired to do.

Now saying that I should not as an independent developer customise certain behaviour or appearance in a browser (say scrollbars, or many others) to appease that arbitrary accessibility doesn't make sense. If I can't build a certain app (due to arbitrary constraints that have no security implications) then its accessibility is effectively reduced to 0 isn't it?

If I, as an idiot, want to build a website that screen readers won't be able to parse or will spew lines of William Shake-s-pear as image alt tags, isn't that my choice and am I not able already to do so?

As such, if I for instance wanted to write a game in a browser where some of these things are detrimental, and just can't because, no, accessibility, what does that net any one?

This patronising "we know better everything" is sincerely annoying.

Re:My Current HTML Boilerplate by anoncake on Wednesday April 28, 2021 @03:01AM (#26966546)
You can implement whatever you want, just not in a website. Write an app instead. Sure, it may not be available on Apple device because of their restrictions on that matter, but that's a separate issue.

It would be nice if web developers could be trusted to only disable zoom when it either does not impact accessibility or when making a website accessible is absolutely not possible. In practice, making an inaccessible website is often more profitable because it's less effort. Also, I've seen a lot of ordinary websites disable zoom for no real reason.

Important websites have to be accessible. So if your website would not be accessible anyway, it not existing may not be a gain for anyone but it isn't a big deal either.

And in many cases, it is better for a website to not exist that for it to be inaccessible: Market forces, your employer, school, university or state can require you to access a website that is not accessible to you. They cannot do that if it does not exist.

Re:My Current HTML Boilerplate by hnedeotes on Wednesday April 28, 2021 @10:59AM (#26970124)
> You can implement whatever you want, just not in a website. Write an app instead.

I don't want to write an app for it. By your logic websites should be plain text and we should all be learning N frameworks to do things that are way easier to do in a browser, available without having to install black box crap software on our devices.

It makes no sense, since you can do plenty of worse things than disabling zoom, in fact the browser allows a whole range of things that are not in the interest of users and they don't do anything to curb those, so your point is basically moot.

> In practice, making an inaccessible website is often more profitable because it's less effort.

This has no bearing in real accessibility, it's, as plenty of other things, a red herring, since real accessibility is not defined by zooming or changing your scrollbar appearance - as you can confirm by visiting a very large part of the internet.

> And in many cases, it is better for a website to not exist that for it to be inaccessible:

This is like, your opinion. Which besides being as the saying goes, isn't even backed by any rational argument. Just because you keep saying the same words they don't change reality, unless you're Dumbledore, and you're a character in a book, or a movie, and even then, it only changes the story there, not the story outside of it.

All the cases you mention can, and should be dealt with in legal terms - your school, employer, university, or state, are public entities, there can certainly be accessibility guides, references and standards, as there are in a multitude of others things, exactly to regulate that.

Your argument is like saying, that paper should not be used to draw, or do origami, or write in other languages because someone might not understand what it is, or what is contained in it. Of course, that's silly. And when it comes to government, schools, and public entities, according to the type of documents, printed and available in paper, they do have to follow a specific ruleset, without impacting what paper can be used for in other situations.

Re:My Current HTML Boilerplate by anoncake on Thursday April 29, 2021 @04:26AM (#26978668)
> I don't want to write an app for it. By your logic websites should be plain text and we should all be learning N frameworks to do things that are way easier to do in a browser, available without having to install black box crap software on our devices.

- Web apps don't require less trust than proper ones. Their developers can use dark patterns, abuse your data, etc.

- Cross-platform frameworks exist

- I have no idea why you think I mind hypertext

> This has no bearing in real accessibility, it's, as plenty of other things, a red herring, since real accessibility is not defined by zooming or changing your scrollbar appearance - as you can confirm by visiting a very large part of the internet.

Are you seriously claiming zooming is not an accessibility feature?

> This is like, your opinion. Which besides being as the saying goes, isn't even backed by any rational argument.

Please stop the flaming.

> All the cases you mention can, and should be dealt with in legal terms - your school, employer, university, or state, are public entities, there can certainly be accessibility guides, references and standards, as there are in a multitude of others things, exactly to regulate that.

Sure. And once there are strict accessibility laws, worldwide, that everyone follows, and all the legacy software has been replaced, we can give developers control over zooming again.

Re:My Current HTML Boilerplate by hnedeotes on Thursday April 29, 2021 @11:24AM (#26982368)
> Web apps don't require less trust than proper ones. Their developers can use dark patterns, abuse your data, etc.

They do, mostly because the browser allows it.

> I have no idea why you think I mind hypertext

Perhaps a better model would be that the web shouldn't be hypertext by default (or can be something else), and instead that hypertext is one of the possible formats for something on the web, along with others - the web would be the "envelope" and not the definition of the content.

If you follow your line of thought to the end, then the conclusion would be that we should be left to pure hypertext.

> Are you seriously claiming zooming is not an accessibility feature?

No, I'm claiming that there's no reason to not allow someone to control the behaviour of certain parts of the browser when browsing a web property of someone else, as long as it doesn't pose a security risk. While at it, the browser could implement white listing of actions, data, and other details that the web property has access to without my consent. If I visit a website for a game and it tells me "this website is going to: - disable zoom - change your scrollbars - change the right click button; check which ones you agree/do you agree" there's no loss of accessibility. And the same for scripts, watching mouse input, text typing, hijacking the back button, showing me popups, etc. Of course that would be technically very challenging to implement.

> Please stop the flaming.

The first rule is if you don't like something done to you, you shouldn't do it to others. Once you do you have to man up.

> Sure. And once there are strict accessibility laws, worldwide, that everyone follows, and all the legacy software has been replaced, we can give developers control over zooming again.

Why do they need to be strict and before-hand?

Re:My Current HTML Boilerplate by mvanbaak on Tuesday April 27, 2021 @06:16AM (#26954059)
This! The whole movement of making webpages do all the things apps can do…
Re:My Current HTML Boilerplate by megous on Tuesday April 27, 2021 @08:26AM (#26954948)
That's what I tell iOS users that complain that page zooms in if they tap too fast on a button adding items to cart. It's for their own good, and they can thank their overlord - Apple.

Not zooming in when doing stuff unrelated to intent to zoom, is just not in their interest as determined by Apple.

Re:My Current HTML Boilerplate by anoncake on Thursday April 29, 2021 @04:29AM (#26978685)
Yes, if their browser's UI has problems distinguishing between zooming and clicking buttons, that's definitely the responsibility of the browser's vendor. Who can only improve that if the browser is actually in charge of the UI – e.g. zooming is implemented by the browser, not by every random website.
Re:My Current HTML Boilerplate by pjc50 on Tuesday April 27, 2021 @06:00AM (#26953964)
Perhaps one of those features which should have been made a toggle, but yes: pinch-zoom is an essential feature which all sorts of sites were disabling for no good reason, and so this toy gets taken away from everyone. This kind of tragedy of the commons stuff is why we can't have nice things on the web.
Re:My Current HTML Boilerplate by austinjp on Tuesday April 27, 2021 @05:28AM (#26953762)
Thanks for this, is it backwards compatible with previous versions of iOS? Or is there some combination of incantations that does graceful degradation?