WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accessible .Net forms

for

From: Austin, Darrel
Date: Sep 22, 2004 12:14PM


> I tried running the page thru http://validator.w3.org to first check
> the markup of this main page. It seems the online validators can't
> handle
> the .aspx pages.

Let me preface this by saying I'm by no means an expert on .net. My
background is graphic/web design and I've spent the last year or so
developing in .net. At this stage, I'm at the point somewhere in-between
'hack' and 'seasoned .net developer' ;o)

That said, .net is not very standards compliant nor accessibility minded.
Some of the main issues I've come across:

* Postbacks

In .net, a page can have multiple states. To change the state of a page,
you'd often use postbacks, which are triggered automatically on form
submissions (you're basically reloading the same page with different
variables). VisualStudio.net also lets you make pretty much any action
trigger a post back. The catch is, outside of form submits, any trigger must
be activated via javascript on the front end. On our new public site, I
decided this was unacceptable and, as such, had to code workarounds where
all 'state' information is sent back via querystrings.

* Default webcontrols

When using VisualStudio.net, you can whip up fairly quick interfaces using
many of .net's default controls. These are things like Datagrids and
Datalists. The problem is that these all tend to make your basic of tables,
and often invalid tables. There's no way to add TH tags, etc. very easily.

* Validation

Most of the built-in validation controls work very nicely on the server
side. The client-side stuff tends to be IE-centric javascript. Either skip
client-side validation or look at writing your own.

* XHTML

..net, at this point, when using vs.net, has no concept of valid xhtml
markup. Very frustrating.

Apparently, many of these issues are being addressed in the new versions of
..net and VS.net that will be coming out. Also, you can get around any of
these issues provided your developers write code to get around it. The main
catch is that, by default, VS.net does little to assist the developer in
writing fully compliant markup.

> How can I validate online? I tried this method but maybe there's a
> better solution . . . I saved the .aspx file as .htm to my desktop and
> then was able to validate at http://validator.w3.org. But I'm going to
> run into problems with validators such as Bobby or Cynthia Says that
> can only validate a URI, not a file from my hard drive and I don't
> have

Well, you can't validate ASPX using an HTML validator, so what you are doing
is just fine. You could just upload these pages if you'd prefer, but I'm not
sure why a local validator won't work for you.

Again, I don't want to call myself anyone resembling a .net expert, so
someone else please jump in and correct anything I've said if need be.

-Darrel