Struts Javascript Validator Accessibility Issues??

S

Sudsy

Dom said:
Hi,

does the struts validator use client-side or server-side javascript?

If it uses client-side validation then will there be accessibility
issues as outlined by W3C ( http://www.w3.org/TR/WAI-WEBCONTENT/ ).

It uses server-side validation with the option for creating JavaScript
for the client-side. Since you don't control the client, you still need
to perform validation on the server.
Accessibility is an entirely different consideration.
 
A

Andrew Thompson

Dom wrote: ...

It uses server-side validation with the option for creating JavaScript
for the client-side. Since you don't control the client, you still need
to perform validation on the server.
Accessibility is an entirely different consideration.

I understand the OP's question though.

Too many JS based apps. *require* JS
or you do not see the GUI, whereas
Struts JS validation simply adds a
layer of DHTML (validation), over a
completely functional HTML (the form).
 
D

Dom

Andrew Thompson said:
I understand the OP's question though.

Too many JS based apps. *require* JS
or you do not see the GUI, whereas
Struts JS validation simply adds a
layer of DHTML (validation), over a
completely functional HTML (the form).


Great! The fact that its server-side saves me a lot of hassle.

Currently all my forms extend ValidatorForm. Implementing the validate
method on my form would have been a pain (but not difficult) to do
through out all my forms......espcially when I thought I've finished!

My thinking was that Struts somehow forced its JS (in
validator-rules.xml) down to the browser and got the browser to
execute the JS.....which would have caused accessibility
issues.......which is all WRONG.

Many thanks for you replies guys!
Dom
 
A

Andrew Thompson

My thinking was that Struts somehow forced its JS (in
validator-rules.xml) down to the browser and got the browser to
execute the JS.....

No. The way it works is more like this,
when the UA (read browser) sees.. a tring like
<script type='text/javascript' src='common.js'></script>

It requests and downloads the file if and when
it damn well feels like it.

If it does not understand JS it will
ignore it and save the bytes.
..which would have caused accessibility
issues.......which is all WRONG.

No. The point is that the JS (that arrives
or not, and is exectued or not) simply enhances
the existing form and provides faster form
validation feedback than is possible with the
round trip to the server.

If it is a well designed web-app., even with
JS, there is no question of accessibility issues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top