Hacker News new | ask | show | jobs
by drewmclellan 4842 days ago
The issue Bootstrap still has is that the parts that make use of JavaScript completely rely on JavaScript. If you're on a flakey data connection, for example, and JavaScript doesn't load parts of the page simply break.

The tab component is a good example of this - turn off JavaScript in your browser and you'll see that it still looks like tabs (thanks to CSS) but you just can't access anything part from the first tab.

Technically, this isn't a hard problem to solve. Have JavaScript add the HTML class that triggers the CSS rules to make the content look like tabs. If JavaScript fails, no part of the page ever gets hidden.

It would be great to see Bootstrap embrace progressive enhancement properly. With more devices of different capabilities accessing the web over networks of varying quality all the time, it becomes more important than ever to build robustly and not just for the best-case scenario.

1 comments

I disagree. As a web designer/developer your job is to make sure your site looks proper. If someone chooses to disable javascript, they know that they are missing out. It's their personal choice to embrace an inferior web experience, and I don't think it's fair to have to compensate for them as well.
...except that JS can also fail due to network lag or simple programming errors (like a trailing JSON comma in IE). Ideally, sites should remain as functional as possible if JS or CSS fail to load. (Admittedly, a great many large websites fail this test.)
Requiring a refresh is not outlandish. If they failed to load the content due to network error, they will already be used to that kind of flaky connection and the refreshes it requires.

Specifically building your app to attempt to handle the "bad data connection" use case that users already are familiar with in the context of the internet seems like bad programming.

Why provide a usable but substandard experience when those users would get a superior experience after a simple refresh?

As for the "turned it off crowd": in terms of web apps, who cares? If you've disabled Javascript, you're not looking to use web apps -- period. Javascript is required to use web apps for anything other than fancy form posting...

Of course, every site's audience is different, and you should prioritize your development for your audience.

It's annoying when you're using a different device in a locked down environment to have to deal with pages braking because some JS (or other) won't load on whatever piece of junk browser or device I have to use. I had this issue a lot when traveling through Asia, I never realise how bad accessibility was until I had to use crap phones and dodgy computers to access airline websites.

For the love of god please provide a BASIC fall back!

Slightly adhomien edit, but I think you're ignorant and live in a bubble. Not everyone uses their computer, or has the same level of access, like you do.

What you call a bubble, I call my target audience. I don't mind that I accurately target my audience and prioritize my development towards them.

If information is what you care about and not design, style, or functionality, than my pages are perfectly readable on a screenreader. It will look and function like shit but the people who see it that way A) expect to or B) are not my target audience.

But you're right, it's a bubble. If my audience included people with poor data connections in Asia, then I would certainly approach the problem differently.

However, when it's just one guy making something, prioritization and cutting out the nonsense (like bad connections from Asia) are vital ;)

If any of your target audience may use your service from a less than desirable connection or device then you should try and make it as accessible as possible. Falling back to non fancy CSS and JS is vital.

It seems that a lot of services don't really understand their target audience, why would an airline or online travel insurance firm make JS mandatory?

If a load fails due to network issues, the user won't always appreciate that the fault was down to networking. The site might just look broken.

If the failure wasn't related to a network issue (either bad data, or perhaps a buggy JS interpreter on their device) then refreshing won't help. The site will still be broken.

My point is that we can plan and build in such a way that JavaScript failures don't break the page. It's a little bit more work (doing things well usually is) but a reusable component library is absolutely the right place to focus that effort. Everyone then gets the benefit with no more work required.

I agree that the NoScript folks can be ignored for apps. However, for web sites which consist primarily of rich documents, it's polite to at least try to convey the same information.

> Specifically building your app to attempt to handle the "bad data connection" use case that users already are familiar with in the context of the internet seems like bad programming.

Au contraire: It's the height of good programming to attempt to predict and handle as many real-world errors as humanly possible. If I'm writing a USB device driver, you'd best believe I should try to do something sane if the cable comes unplugged, rather than just saying "don't do that".

Also, not all users will understand that components didn't load (many users still don't even know what a browser is!). And if the failed load is due to a proxy/firewall/DNS problem, or just a straight-up bug, a reload may not solve it anyway.

In any case, you're spot on about prioritizing development to the audience. Guidelines can be a good start, but there's no "one size fits all" for the web.

>Au contraire: It's the height of good programming to attempt to predict and handle as many real-world errors as humanly possible. If I'm writing a USB device driver, you'd best believe I should try to do something sane if the cable comes unplugged, rather than just saying "don't do that".

Should you devote a lot of your limited programming time to catching an exception that users naturally experience during USB operation and can be corrected by a simple "unplug and replug?"

I argue that you shouldn't devote undue attention to something that users naturally already handle.

But if your project is healthy and features are rolling out and you have the time and talent to waste on edge cases like this, then why not!

It is totally fair unless you're creating a web application but my idea is that the first priority of a content-heavy web site should be to make its content as accessible as possible. Also, inferior experience should not mean they miss more than half the content.