WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: "no JavaScript" alternative

for

From: Jukka K. Korpela
Date: Mar 14, 2011 8:00AM


deborah.kaplan wrote:

> Obviously if you have the resources, making the functionality work
> both with and without JavaScript would be preferable.

In a case like a simple (?) calculator, the difficulty of proving a
server-side fallback mainly depends on the existence of skills and technical
possibilities to create and install server-side scripts in general. When the
skills and possibilities are present, it should not take much more than ten
minutes to set up the fallback. But if people need to start learning how to
use a particular server-side technology and programming language, it might
take much much longer. (There's in particular the issue that client-side
programming is almost exclusively done in Javascript, whereas server-side
programming mostly uses other languages.)

> But as long as
> the page without JavaScript TELLS the user that enable JavaScript
> will enable the functionality, that should be adequate for most
> cases.

Well, yes, if it says specifically why Javascript is needed. Security-aware
people will hardly buy a statement like "Turn Javascript on!" or "Enable
Javascript to use this page". Rather, e.g. "Please enable Javascript in your
browser, so that the total sum can be shown to you."

The common technique is to use a noscript element on the page, near the
start, and rather prominently. In principle, a better approach, at least
according to HTML5 drafts, is to put the text in a normal element, say p
element, and use Javascript to remove it as well as to add any extra
elements that are needed and make sense only when Javascript is enabled.

--
Yucca, http://www.cs.tut.fi/~jkorpela/