Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1098
  • Last Modified:

Need help interpreting a 508 compliance issue regarding JavaScript onChange event handler

508, paragraph l, says:

"onChange: This event handler is very commonly used for triggering JavaScript functions based on a selection from within a <select> tag. Surprisingly, it presents tremendous accessibility problems for many commonly used screen readers and should be avoided. Instead, web developers should use the onClick event handler (associated with a link or button that is adjacent to a <select> tag) to accomplish the same functions."

I use onchange to populate a dynamic list box of states based on the selection of country, like this:
      <select name="country" id="country" onchange="MM_callJS('setDynaList(0,arrDL1)')">
      
It's not clear to me how I would do this as 508 suggests, specifically: "web developers should use the onClick event handler (associated with a link or button that is adjacent to a <select> tag) to accomplish the same functions".

Any ideas? I know that 508 was written a long time ago - is this still an issue for "modern" screen readers?
0
alicia1234
Asked:
alicia1234
2 Solutions
 
Pawel WitkowskiSenior Javascript DeveloperCommented:
From what I known it is no longer an issue. In mine opinion you can use onchange without any problems. If you really woried about that, you can try:

<select>
<option onclick="selected=1">one</option>
<option onclick="selected=2">two</option>
<option onclick="selected=3">three</option>
</select>
0
 
Michel PlungjanIT ExpertCommented:
What browsers have an onClick event on options?
0
 
Pawel WitkowskiSenior Javascript DeveloperCommented:
Good point, works only in Opera/Firefox.

You can then try delegate onclick to <select> element and then check index of selected element o_O
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
alicia1234Author Commented:
Thanks for the info so far. wilq32 said "From what I know it is no longer an issue." I'd love to know that for sure and then I wouldn't even worry about it.
0
 
Pawel WitkowskiSenior Javascript DeveloperCommented:
Maybe this discussion will help your needs:

http://www.webaim.org/discussion/mail_thread.php?thread=3594
0
 
Bob StoneIT GuruCommented:
Here is a time limited eval software that will test 508 compliance of a web site
http://www.powermapper.com/products/sortsite/ads/acc-section-508.htm?gclid=CNzUy4K8sJsCFZJM5QodbU0oqg 
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now