Javascript Frameworks and Accessibility

Discussion in 'Web Design and Development' started by dacreativeguy, Aug 27, 2008.

  1. dacreativeguy macrumors 68000

    Joined:
    Jan 27, 2007
    #1
    I'm trying to find some definitive info on how javascript frameworks (specifically YUI) comply with Section 508. I've found vague references here and there in Google, but no 'smoking gun'. Anybody have links to pages that can answer my question?
     
  2. bootedbear macrumors 6502

    bootedbear

    Joined:
    Sep 13, 2004
    Location:
    Austin, TX
    #2
    I'm not particularly familiar with YUI, but I know that jQuery stresses the concept of "Unobtrusive JavaScript" where, in the same way that CSS should be used to keep style out of the markup, the behavior defined by JavaScript should be segregated from the structure of the HTML.

    This makes it easier to author pages that "degrade" gracefully when JavaScript is disabled, and are friendlier to page readers and the like.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Like bootedbear eluded to, it's really how a developer implements a framework that really makes a web site accessible or not. A JavaScript framework cannot force a developer to use it in an unobtrusive way, or to make sure the page still works when JavaScript is disabled. This is why you're not finding anything, because no framework can guarantee accessibility. The vague finds you've come across are likely talking about how the framework works well to accomplish unobtrusive development, but again, they can't control what the developer codes up.

    Edit: Here's a page at Wikipedia I found that has some decent info, especially the references at the bottom. Reference 14 links to a page for Dojo and talks about their approach to accessibility. Looks like a decent read for those interested.

    Here's another helpful page that has a bunch of links related to AJAX accessibility.
     
  4. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #5
    I code for the government and lecture about this subject often. Below are my thoughts on JS frameworks/Ajax taken from one of my 508 presentations:

    Here is the actual requirement, verbatim, as per 1194.22 (Web-based intranet and internet information and applications) from the ammendment to the Rehabilitation Act of 1973 (29 U.S.C. 701) known as section 508:

    That is number 12, one of 16 total requirements actually, and after much research and consolidation of developer feedback including Internet discussion on how to best meet this requirement, I advise the following:

    Code:
    Best Practices:
    
    Use the TITLE attribute if a text link:
    
    <a href="javascript:myFunction();“ title=“Information about this link goes here…”>Start myFunction</a>
    
    Use the ALT attribute if a link uses a graphic:
    
    <a href="javascript:myFunction();"><img src=“image.gif” alt=“Information about this link goes here…”></a>
    
    Use the <noscript> tag to include content for browsers with client side scripting disabled.
    
    Use “onClick()” for basic link event handling as opposed to:
    
    OnDblClick() – not supported by most screen readers or legacy browsers
    OnMouseDown()/OnMouseUp()  - this is confusing to Assistive Technology devices
    OnMouseOver()/OnMouseOut – i.e. image rollovers  - most legacy screen readers don’t support this, provide redundant text links
    OnChange() – i.e. within select tags – avoid use entirely if possible
    OnBlur()/OnFocus() – most screen readers don’t recognize this behavior, using this is ill-advised
    
    If a script is used to generate popup menus or new windows, the web developer must also provide redundant text and/or links that match the text in the script.
    In terms of AJAX, specifically:

    SUMMARY

    This is what you need to know - best practices are suggestions, not guidelines! The burden is with the developer to code to W3C standards and not to the assistive technology versions or features. Use these suggestions to allow users with accessibility issues to attain your content without relying upon client side scripting. Provide alternatives using the suggestions or your own custom implementation, whichever works for you. Validation tools do not address presentational issues, merely syntax issues or missing elements or measurable metrics that will impair assistive technology devides.

    Every developer with have a unique opinions - consider this a consolidation of techniques to help you get it done without too much extra work. By no means consider the information in this reply "the final say".

    -jim
     

Share This Page