jordankilmer/alloy-ui — pull request #1 by mjbradford89 (2014-07-16 19:31:41+00:00)
Title: AUI-1366 - Make aui-tree accessible

Hi Jordan,

Marc asked me to review this one cause he is a little swamped. Great job on it! I went ahead and made some changes. Most of them were just source formatting.

A good resource we have been using for examples and such for accessibility is http://oaa-accessibility.org/examplep/treeview1/.

Based on their examples, I added the ```role="tree"``` and ```role="treeitem"``` to the tree and treeitem html, as well as the ```aria-expanded``` attribute for parents. And I also removed the ```aria-labelledby``` attribute, as I don't think it's necessary in this case. The screen readers will read the label by default for treeitem elements.

If you want to and have time at some point, one thing we could do is leveraging the YUI NodeFocusManager plugin (http://yuilibrary.com/yui/docs/node-focusmanager/) for keyboard controls. I've just started using it on other accessibility tasks and it really works great and reduces a lot of code. It would allow us to remove a lot of the code in _handleKeypressEvent. But I think we would still have to keep the code for left/right expanding and collapsing of parents.

Please let me know if you have any questions.

Thanks!