WebAIM - Web Accessibility In Mind

E-mail List Archives

The full unminified AccDC source code is now available to download.


From: Bryan Garaventa
Date: Sep 26, 2012 4:41AM

For those interested, the full, unminified, commented AccDC source code has been added to the AccDC archive package downloadable at WhatSock.com.

Additionally, I've updated the code for the Accordion, Footnotes, and ARIA Tree generators, which unfortunately weren't scalable as they were initially written. So now all of these can be called using an invocation statement with config objects and optional callbacks.

The ARIA Tree Generator is particularly powerful now, which now supports the generation of multiple trees using different XML files in the same page without conflict.

The syntax being:

var treeId = setTree( config );

For example, the setTree statement at

Fully configures the ARIA Tree generated at

In the demo, the bind property is set to 'focus', but this can just as easily be set to 'click' or 'focus click', which will invoke the callback whenever the event is triggered on each tree item.

When there are multiple bind events, they can be distinguished in the callback by querying the event type via:

if (ev.type == 'whatever') Do Something;

Also, since the setTree function returns the AccDC Object ID for the top level tree object, you can programmatically control the tree, including all child objects, via:

var myTree = $A.reg[treeId];

myTree.siblings // An array of all tree objects at the same logical level

myTree.children // An array of all child tree objects

// Or simply
myTree.close() // To make it disappear.

I've also updated all other modules to use the method calls documented in the Misc section on the Core API tab, which has reduced the code sizes for each by twenty to forty percent; making them run faster, more consistently, and negates external dependencies.