WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: "no JavaScript" alternative

for

Number of posts in this thread: 5 (In chronological order)

From: mikeyb leeds
Date: Sun, Mar 13 2011 4:24AM
Subject: "no JavaScript" alternative
No previous message | Next message →

Hello everyone,

I have a question regarding websites that are accessible, but parts rely on
JavaScript being enabled.

I am thinking of creating some functional parts of a website e.g a
calculators, which are accessible, but will not work without JavaScript
enabled. The stats I've found show more than 99.5% of visitors have
JavaScript enabled.

So the behaviour would be as follows:
1. If viewed with a device without JavaScript enabled, a banner would be
displayed saying something like "Please call our 24 hour help line for more
information".
2. If viewed in "accessible" or "mobile" device mode, a lean page, with
text and very few images is displayed.
3. If viewed in desktop mode with JavaScript enabled, there would be more
visual content, but the pages remain accessible.

I currently have a development choice …
Unfortunately we have a system which makes it extremely difficult to change
server side content functionality (e.g. php/jsp) as this is done by another
department but easy to change (html, css and javascript) . So we can either
spend considerable effort maintaining our "none JavaScript" versions of
things like calculators or use a lot less effort to create a site with
better accessibility, usability and features for all users with JavaScript
enabled devices using a "webservice".

For the sake of argument please consider two types of applications:

One you use weekly like a bank balance or investment portfolio, and,

One which you access very occasionally, like twice a year, e.g. insurance
details.

So given the choice, which would you prefer?

Solution "A" has a version which works when JavaScript is disabled.
Solution "B" displays a help desk number when JavaScript is disabled, but
offers better usability and accessibility, and overtime better
functionality.

P.S I know you may be thinking you'd like to do Solution "C", better
usability, accessibility and functionality even when JavaScript is
disabled... me too! unfortunately we only have a fixed amount of resources.

Can those of you who have JavaScript disabled please shout up and tell me
what your are using!


Thanks for your help.

Mike

From: Birkir R. Gunnarsson
Date: Mon, Mar 14 2011 5:48AM
Subject: Re: "no JavaScript" alternative
← Previous message | Next message →

Hi Mike

Just a thought. According to the WebAIM screen reader survey (that was
published just a few days back) something like 98% of screen reader
users have Javascript enabled in their browsers.
All modern screen readers should work fine with Javascript content, so
it seems like a better use of resources to concentrate on better
usability and accessibility, rather than support the very small
percentage of users who, for some reason, are using outdated browsers
or very old screen reader software, or choose to turn Javascript off.
Of course, in the perfect world, you should be able to do both, but I
think it is nearly impossible to always accommodate everyone.
Perhaps, if Javascript is disabled and the page can detect that, in
addition to the helpline banner displaying, you could say "this page
has detected that you have Javascript disabled. We appologize for the
inconvenience but some of this page's functionality relies on
Javascript for its operations. If you want to enable Javascript in
your browser, please see page (x)".
This is assuming you find a good page that explains how to enable
Javascript in different browser types and versions.
This might be overkill, but it is always nice to get as specific an
error message as possible, ideally with links to solutions.
Good luck with the project.
-Birkirbrowsers

On 3/13/11, mikeyb leeds < = EMAIL ADDRESS REMOVED = > wrote:
> Hello everyone,
>
> I have a question regarding websites that are accessible, but parts rely on
> JavaScript being enabled.
>
> I am thinking of creating some functional parts of a website e.g a
> calculators, which are accessible, but will not work without JavaScript
> enabled. The stats I've found show more than 99.5% of visitors have
> JavaScript enabled.
>
> So the behaviour would be as follows:
> 1. If viewed with a device without JavaScript enabled, a banner would be
> displayed saying something like "Please call our 24 hour help line for more
> information".
> 2. If viewed in "accessible" or "mobile" device mode, a lean page, with
> text and very few images is displayed.
> 3. If viewed in desktop mode with JavaScript enabled, there would be more
> visual content, but the pages remain accessible.
>
> I currently have a development choice …
> Unfortunately we have a system which makes it extremely difficult to change
> server side content functionality (e.g. php/jsp) as this is done by another
> department but easy to change (html, css and javascript) . So we can either
> spend considerable effort maintaining our "none JavaScript" versions of
> things like calculators or use a lot less effort to create a site with
> better accessibility, usability and features for all users with JavaScript
> enabled devices using a "webservice".
>
> For the sake of argument please consider two types of applications:
>
> One you use weekly like a bank balance or investment portfolio, and,
>
> One which you access very occasionally, like twice a year, e.g. insurance
> details.
>
> So given the choice, which would you prefer?
>
> Solution "A" has a version which works when JavaScript is disabled.
> Solution "B" displays a help desk number when JavaScript is disabled, but
> offers better usability and accessibility, and overtime better
> functionality.
>
> P.S I know you may be thinking you'd like to do Solution "C", better
> usability, accessibility and functionality even when JavaScript is
> disabled... me too! unfortunately we only have a fixed amount of resources.
>
> Can those of you who have JavaScript disabled please shout up and tell me
> what your are using!
>
>
> Thanks for your help.
>
> Mike
>

From: deborah.kaplan
Date: Mon, Mar 14 2011 7:00AM
Subject: Re: "no JavaScript" alternative
← Previous message | Next message →

The percentage of web users who have a tendency to turn JavaScript off are much more likely to be your advanced users, often using a tool such as the Firefox extension NoScript, who were making the choice for security or usability reasons. Some of those users will have accessibility needs, others won't. Advanced users are perfectly capable of turning JavaScript back on if the page tells them that they need to enable JavaScript in order to use the functionality. The worst pages are the ones that simply don't work without JavaScript, without telling the user the reason why. Silent failure modes in the absence of JavaScript.

Obviously if you have the resources, making the functionality work both with and without JavaScript would be preferable. 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.

-Deborah

From: Jukka K. Korpela
Date: Mon, Mar 14 2011 8:00AM
Subject: Re: "no JavaScript" alternative
← Previous message | Next message →

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/

From: mikeyb leeds
Date: Wed, Mar 16 2011 3:39PM
Subject: Re: "no JavaScript" alternative
← Previous message | No next message

Hi everyone,



Thanks for your comments.

Jukka, thanks for the “top tip” about replacing a <p> element with
JavaScript.

Good call, we plan to a use a “Progressive Enhancement” development
approach.



Mike