I’m trying to convince my employer to let us use the Microsoft ASP/AJAX toolkit since it simplifies the implementation of many controls. However they have rejected the idea on the grounds that it produces “AJAX code” which is not ADA compliant. However the same employer requires webpages to be written in ASP.NET Web Forms which, as far as I can tell from the source, is very very far from ADA compliance.
I am new to both web programming and ADA compliance.
My questions are:
- Do ASP.Net Web Forms actually produce ADA compliant HTML?
- Will the ASP/AJAX toolkit undermine the goal of ADA compliance?
1
ASP.Net webforms is just a web technology. Nothing inherent in it, or the code it generates, is ADA compliant. While it could be compliant, Microsoft makes no guarantee of that. At the end of the day, it’s all just markup and up to the developer to ensure that it complies with ADA. The same goes for the control toolkit. AJAX code does mean there are more moving pieces, but there’s nothing to say you can’t write compliant code using it (it just could potentially make it more difficult).
This is from Microsoft’s ASP.NET documentation:
ASP.NET controls are designed to be accessible by default. This means that they automatically render accessible HTML if possible, or they expose properties that you can set to make the pages accessible. For example, ASP.NET controls offer the following features to support accessibility by default:
-
Generate HTML that uses CSS for visual formatting.
-
Use tables to present data, not to arrange visual elements on a page.
-
Provide indications of table structure by marking header and footer rows.
-
Associate labels with the controls that they pertain to.
-
Generate client script that is device independent, such as client script that responds both to mouse clicks and to keyboard actions.
-
Specify tab index settings for input elements.
-
Provide a way to specify a text equivalent for any non-text element.
Some controls generate HTML based on templates for which you provide the HTML. In those cases you must manually configure the markup in the templates so that the generated HTML complies with accessibility guidelines.
There are some exceptional situations in which controls generate HTML that may not comply with accessibility standards. ASP.NET 4 includes many enhancements that eliminate most of the exceptions that existed in earlier versions of ASP.NET, or that provide alternatives to them. For more information, see What’s New in ASP.NET 4 and Visual Web Developer.
The following sections present techniques for creating accessible Web pages that conform to each WCAG guideline by using Visual Studio and ASP.NET. For some guidelines, there are no considerations that are specific to ASP.NET. Therefore, sections devoted to those guidelines are omitted in this part of the topic.
9
In my limited research of ADA compliance, the problem with AJAX was how screen-readers handled it. If I recall, since screen-readers read the markup from the top-down they may not be able to respond to dynamic markup that is later injected into an HTML form via an AJAX call (or other dynamic change, for that matter). So if you have a DIV that you want to use as a popup or fill with dynamic content, if the screen-reader has already parsed it, it will not necessarily ‘re-parse’ it after you dynamically change the contents. So your user may not know the form has changed. Different readers had different limitations, but I do remeber thinking strict ADA compliance really restricted the convenience of AJAX.
However, ASP.NET does not force you to use AJAX, so ADA requirements should not disqualify the use of ASP.NET in any way.