5 ms·
On the subject of JavaScript and NoScript. I'm a JS dev working with some relatively large institutions building single page web applications using JS framewor
by string 7y ago
On the subject of JavaScript and NoScript.
I'm a JS dev working with some relatively large institutions building single page web applications using JS frameworks. Unfortunately I have seen there is often an unwillingness from both management and some developers to invest in server side rendering of SPAs. There is always a willingness to support users who have visual or other accessibility requirements, yet users who want or need to disable JS are often left out in the cold.
I love JavaScript but I still believe it is important to provide alternatives for those that don't.
- gruez 7y ago>There is always a willingness to support users who have visual or other accessibility requirements, yet users who want or need to disable JS are often left out in the cold. Because accommodating disabled people is mandated by the ADA. No such requirement exists for noscript users.
- _0o6v 7y ago> yet users who want or need to disable JS are often left out in the cold. Isn't that just a preference of the user, that has repercussions? In fact the WCAG 2.0 specifically says that a JS fallback is _not_ a requirement for accessibility - a common misconception is that disabled users disable JavaScript - this isn't actually true. Fair enough if you want to turn off JS for tracking reasons or whatever, but you have to accept that some things might not work without it.
- string 7y agoExactly! Whilst I understand the reasons, it is nevertheless a shame that the willingness is born from requirement rather than the want of actually making things accessible for as many users as possible.
- spookthesunset 7y agoThe marginal benefit from making a site available to the relative handful of people who refuse to run javascript is miniscule. The marginal cost of doing so is huge.
- hn_throwaway_99 7y ago> yet users who want or need to disable JS are often left out in the cold. Because it's simply not worth it. Do the math on the number of people who want to be able to use a site without JS (and the even smaller number who would absolutely refuse to use a site without JS) vs. the large cost of maintaining essentially 2 versions of the site. Couple that with the fact that the types of people who disable JS tend to make horrible customers (and I'm not saying that's at all a bad thing, but from the pure economic perspective of the site owners it means their opinion counts less).
- quelltext 7y agoStupid question: How would you even accomplish an SPA with server-side rendering but no (client-side) JS at all? SPA to me implies that essentially all the content is fetched not via traditional navigation but AJAX requests fetching pages/content etc. and the local JS code making sure to switch out the currently displayed contents. My understanding was that server side rendering simply speeds up first load of an SPA since it doesn't need to be rendered on the client, but then you still need JS to actually get any additional content and navigate. I guess one could build something that looks/behaves like a traditional web app with links leading to new pages that are rendered by the server and if JS is enabled switch to what I described earlier. Would the former really be considered an SPA though?
- why_only_15 7y agoIf you have a blog that lives at `/` for example and posts that live at `/post/:num` for example, your SPA will have a href="/post/5" or whatever link, and then when you navigate there the SPA will get that blog's content from the server and be rendered there. I agree though that if you have comment functionality for example that would probably be made through an AJAX request in Javascript and it probably wouldn't be possible to automatically switch that to a form.
- quelltext 7y ago> A single-page application (SPA) is a web application or web site that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server. I guess the definition of an SPA is not as strict as Wikipedia says? But what makes such a web app (like you mention with actual page navigation) an SPA? That's just a ... normal web app/site. I guess the point was that a perfect SPA has a fallback mode that works without JS? I'm just not sure that exists at the moment. If you invest in an SPA and its (perceived) advantages aren't you choosing it precisely because you want it to be more than a traditional web app with individual pages? Hence all the JS and reactiveness in the browser. Building a degraded fallback mode would be admirable but it's a whole lot of added complexity (have to find alternative UX to accomplish those JS interactive pieces). If your SPA isn't actually an SPA maybe just stick with a traditional setup. That's why I don't understand the drift in that original comment.