News for hackers. Stuff that matters.
Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @12:20PM (#3234778)
There is something wrong - in many countries you are mandated by law to make your site accessible :)

Of course this doesn't apply here, but I wanted to be dramatic. Should be piece of cake to just show the full content if javascript is off, since it is already loading all of it.

Re:InstaCSS: the CSS docs you always wish you had by slig on Monday November 14, 2011 @06:31PM (#3236183)
I can't reply to your last comment, so I'm going to to it here:

> The point is that it's trivial to make a site like this usable without JS, with little effort. You just have to start with the right mindset.

How are you supposed to make a instant search usable without JS?

If it doesn't need to be instant, just normal search with a nice GET /search?q=border, one would have to program a server side script to do that search.

Or maybe you'd just want to show the whole reference on the HTML, then the JS would have to use that to do the search and hide/show the appropriate div, or you'd have to load everything twice (once in the HTML body and again via ajax). Even then, what's the point? It's a instant search. If the user can't use the only feature of it, he's better off googling.

Is there other way that I'm missing? I don't see that as "trivial".

Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @09:31PM (#3236706)
If you read the other parts of the thread, or check the source code, you'll see that the whole content is loaded at once. There are no further requests. It's all already there with `display:none`.

    document.getElementsByTagName('html')[0].className += ' js'

    .js #search-results { display:none; }
That's basically all you need.
Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Monday November 14, 2011 @05:08PM (#3235910)
Screen readers support Javascript-enabled browsers these days.
Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @06:08PM (#3236131)
Accessibility is not just about screen-readers. There are hundreds of mobile browsers, consoles and a myriad of other devices with zero to broken javascript support. And even in screen-readers that do support JS, most interactions are broken unless you use proper mark-up and manage page focus and keyboard shortcuts.

The point is that it's trivial to make a site like this usable without JS, with little effort. You just have to start with the right mindset.

Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Monday November 14, 2011 @10:24PM (#3236864)
> There are hundreds of mobile browsers, consoles and a myriad of other devices with zero to broken javascript support.

These days, both of the major mobile browsers use WebKit and have great JavaScript support, though they may not support bleeding-edge browser functionality quite yet (for which all non-demo sites definitely need fallbacks). The unofficial mobile browsers have great JavaScript too. Consoles have decent browsers with decent JavaScript, and in any case not all sites need to expect console browsers as a remotely common case.

You have to draw the line somewhere, and not all sites need to support Lynx, Links, or Mosaic. I certainly agree that having decent fallbacks for a site like this doesn't require that much effort, but not all functionality supports graceful degradation.

These days, browsing without JavaScript seems less likely to indicate an older browser, and more likely to indicate a user with JavaScript intentionally disabled using something like NoScript. That user may get righteously offended that a document would dare to run code on their system, but that doesn't necessarily make them right.

All web features tend to follow a three-step lifecycle: too new to use at all except for demos, stable enough to use with fallbacks for older browsers, universal enough to use without fallbacks. Depending on your site and your target audience, basic JavaScript may fall in the second or the third category.

Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @11:52PM (#3237078)
You don't have to draw a line anywhere in cases like this. The technology is there that makes it perfectly possible to have at least basic text display on any client. The "major" mobile browsers with webkit represent only 20-30% of the global market.

Anyway, it's just a couple of extra lines of code, get over it :)

Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Tuesday November 15, 2011 @01:41AM (#3237303)
Again, that works just fine in cases like this. Though note that the solutions for this site require either server-side scripting or just completely disabling the search functionality.

However, many sites use more advanced JavaScript features which do not necessarily allow for graceful degradation.

(Also, most other mobile browsers of the type you allude to consist of barely more than WAP; only the simplest of non-interactive websites has any hope of working with them. And many sites simply won't have any of those users in their target audience.)