Beyond 2020 twitterBeyond 2020 BlogBeyond 2020 Linkedinbeyond 2020 youtube

Tap in to your data’s intelligence

Beyond 20/20 Blog

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that has been used in the blog.
  • Bloggers
    Bloggers Search for your favorite blogger from this site.
  • Team Blogs
    Team Blogs Find your favorite team blogs here.
  • Login

Experiences in Web application accessibility - No Javascript - Part 1: Overview

Posted by on in Blog
  • Font size: Larger Smaller
  • Hits: 20310
  • Subscribe to this entry
  • Print

Many of you probably have an web application that works great and has done so for years. Well, that is, it works as long as the browser used to access the application has JavaScript enabled. Otherwise, it does not work at all, or at best, only some of its functionality works.  Your clients are now telling you that the content of their web site has to conform to certain accessibility standards, and unless your web application can conform to these same standards, they will no longer be able to use your application. You then learn that one of the rules of these standards is that your application must work without JavaScript.

Many web applications out there depend on JavaScript. Without JavaScript enabled in the browser, they either don’t work at all or have significantly reduced functionality. For example, if you try to use Facebook with JavaScript disabled you’ll find that you can’t do much. You’ll be able to see your news feed, but it won’t be updated automatically; for that you’ll have to manually refresh your page. You won’t be able to update your status, and you won’t be able to like or comment on others’ posts. You won’t even be able to see most of your own profile page!

As organizations all over the world, especially federal government agencies, are trying to make information available to everyone, you are likely to run into issues with JavaScript. Some people with certain disabilities need to use assistive technology to access the Internet and interact with the content of web pages. For some of these people, JavaScript, or actually the way it is used in web applications, prevents them from accessing information and interacting with the content of web pages using the tools that are available to them. In order to reach these people, a lot of organizations and government agencies require that all pages and applications on their web site follow certain accessibility standards, which usually have some kind of restriction on the use of JavaScript. In some cases, these standards are part of the law.

If your clients are part of the United States government, any application on any government web site has to follow the rules outlined in section 508 of the U.S. Rehabilitation Act. At the time of this writing, this standard does not require that a web application function without JavaScript, but it does impose some rules on how JavaScript can be used. Most organizations and governments around the world tend to have their own standards regarding accessibility, but for the vast majority, these standards encompass another standard called the Web Content Accessibility Guidelines (WCAG). These guidelines were developed by the World Wide Web (W3C)'s Web Accessibility Initiative (WAI). Version 1.0 of this standard became a W3C recommendation in 1999. In 2008, version 2.0 became the new recommendation. The first version was very clear on the use of JavaScript. Checkpoint 6.3 of WCAG 1.0 states, “Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page.” Therefore, any application that wants to conform to this standard has to work with JavaScript disabled. Although there are ways to work around this by providing “alternative accessible pages”, most people want the actual functionality and not an alternative page. The standard doesn’t say that you can’t use JavaScript, but your application must work without JavaScript. If you use JavaScript, there are certain rules to follow.

WCAG 2.0, however, is not as clear as WCAG 1.0 on the use of JavaScript. It doesn't mention scripting directly. Instead, it refers to “accessibility supported technology” as being allowed, but it's not clear what technology is considered accessibility supported. It is possible to use JavaScript in an accessible way, but does this mean it's considered accessibility supported?  The WCAG 2.0 standard does not make any claims about any technology - it's left up to us to decide. In my experience, organizations following WCAG 2.0 want an application that works without JavaScript, providing full functionality. You can add JavaScript, used in an accessible way of course, but only to enhance the application and not to provide extra functionality.

There is another standard being developed by WAI called Accessible Rich Internet Applications, referred to as WAI-ARIA. This standard attempts to make accessible web applications developed with JavaScript, AJAX and similar technologies. In a nutshell, it defines ways to add semantics and other metadata to an HTML document to make it accessible. This looks very promising, but the drawbacks are that, although it is almost completed and the newer browsers and some other user agents can understand WAI-ARIA syntax, this standard is not yet finished and is not yet a W3C recommendation. More importantly, there is a lack of widely available assistive technology (e.g. screen readers) that can work with WAI-ARIA syntax. Therefore, most organizations at this time don’t typically require conformance with this standard.

When you’re dealing with a mostly static website that contains simple forms to be filled out and several links, making things work without JavaScript seems somewhat simple. However, when you’re dealing with a more complex web application, especially an existing one that is dependent on JavaScript, it’s not that easy. If you spend some time searching the Internet for this issue, you will likely run into the term “progressive enhancement”. Progressive enhancement is a web design strategy where you create your application in three layers. The first layer is an application that delivers the content using only HTML. At this point it does not use either CSS or JavaScript. Next, you add the CSS layer – a layer that controls how your application is styled and generally makes it look a lot better. The third layer is the JavaScript. Typically, you add a JavaScript function that is called when the page is loaded, and then goes about adding handlers for various commands on buttons, links and other elements. This is a great technique and is how I believe most web applications should be written.

In this series of No JavaScript blog posts I’ll be mainly concerned with the first layer of progressive enhancement: creating a web application without JavaScript. I will talk about my experience with creating ASP.NET 2.0 applications that work without JavaScript. Each post will consider extra requirements; requirements that make it a little harder to create such an application. Some of these requirements are imposed by standards that have to be conformed to, either directly or indirectly. Other requirements are self-imposed due to techniques I wanted to use or that I wanted to carry forward from another application. I’ll discuss different techniques that can be used to meet the various requirements. These techniques will mainly require knowledge of HTML, ASP.NET and a little CSS.

For each post I’ll assume one main requirement: no JavaScript. This definitely applies to WCAG 1.0, and can apply to WCAG 2.0 or any other standard. In one case I initially had to conform to Level AA of WCAG 1.0 and then later WCAG 2.0, always with the JavaScript restriction, that is, JavaScript could be used, but the application had to work without it. Therefore, I’ll state this requirement as, “Must Conform to WCAG 2.0 Level AA, without JavaScript”.

These blog posts will not discuss the details of the various accessibility standards unless they are pertinent to a specific design or implementation. As well, I will not discuss how to use JavaScript in an accessible way. The focus will be on creating an accessible web application without JavaScript, using ASP.NET.

Rate this blog entry:


  • No comments made yet. Be the first to submit a comment

Leave your comment

Guest Monday, 22 July 2019