Adobe Spry and obtrusive, inaccessible JavaScript

In these days of JavaScript framework mega-hype it is nice to see "Progressive enhancement" at least being mentioned (though pretty well hidden) in the documentation for Adobe's Spry framework. However, just like Jeremy Keith notes in Spryjax, the example is not what I would call progressive enhancement.

Sadly, the demos and examples I have looked at reflect this - they do not use progressive enhancement at all, and they definitely do not degrade gracefully. In addition to that, many examples contain invalid HTML by the way of custom attributes.

Spry doesn't stop at requiring custom attributes either - one of the demos I looked at recommends giving a div element a tabindex attribute to enable keyboard navigation. Well, had someone spent all of 10 seconds to look at the HTML 4.01 Specification they would have noticed that tabindex is not a valid attribute for a div element, which is likely why it does not work in Safari. Even worse is the very odd-looking src value for the image in the Photo Album demo:

  1. src="galleries/{dsGalleries::@base} {dsGallery::thumbnail/@base}{@thumbpath}"

Ok. Now make that degrade gracefully.

Yes, they do state that some demos are just "proof of concept" and that they are neither accessible nor use progressive enhancement. But I am pretty sure that the number of people who will grab an example and use it as-is will be much larger than the number of those who figure out how to make it degrade gracefully. Remember that Spry is aimed at Web designers, and is HTML-centric, and easy to implement for users with basic knowledge of HTML, CSS and JavaScript (emphasis mine).

I also find the following quote from the Spry FAQ disturbing:

If you need to support the case where JavaScript is turned off in your own Spry pages, we recommend that you use a server-side redirect to a static page, or rely on noscript tags in your page to either perform the redirect or notify the user that they must enable JavaScript.

Hmm. I thought this was the 21st century.

Come on Adobe, you both can and should do better than this.

Posted on January 23, 2007 in JavaScript, Accessibility