Re: [w3c/manifest] Add a way to query whether there is a UA-provided back button (#693)

@aarongustafson:

> There are a number of reasons JavaScript may fail to run or why CSS may fail to load. If either of those things happen, the presented document contains a button that either a) appears when it shouldn’t (CSS not loaded or this syntax is unsupported) or b) appears when it should but is non-functional (JavaScript not loaded or error experienced).

Won't this be true for just about every element on the page? A modern webpage is bound to have dozens to hundreds of buttons on it that don't do anything if JavaScript is disabled or broken. In practice, it's essentially a requirement of the modern web that JS is working properly, so having an entire page of non-functional UI is a big problem, but it's rare or indicative of a bigger issue.

Now you *could* follow a strict practice where every UI element that needs JavaScript to work is not included in the base page's HTML, but is instead inserted by JavaScript at load time, to ensure an "all or nothing" experience, but there are major downsides to this (UI loading in sporadically, not part of the initial page load). I'd say this is a fairly niche/extreme philosophy in an era where JavaScript is expected to always work. Most sites are just going to include UI elements in the base HTML. We should give developers this affordance for conditional UI like the back button.

Basically, your point of view is valid, but it is one of a handful of valid approaches. Providing this as a CSS query supports _all_ approaches, whereas providing it as a JavaScript method supports _only_ your approach.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/693#issuecomment-402607032

Received on Thursday, 5 July 2018 05:03:40 UTC