WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Tree role in a forum?

for

From: Bryan Garaventa
Date: May 7, 2018 10:53AM


Hi,
ARIA Tree widgets do work accessibly, but they have to be programmed properly to do so.

E.G It's important to keep in mind that, though role=tree is a composite widget, role=treeitem is not.
http://www.w3.org/TR/wai-aria-1.1/#composite

Which means, the only focusable children allowed within role=treeitem nodes are those that match the required children list in role=tree
http://www.w3.org/TR/wai-aria-1.1/#tree
Specifically, role=group or role=treeitem, and no others.

The mappings for role=tree are also documented here
http://whatsock.com/training/matrices/#tree

If you want to program keypress navigation, this has to be done manually, or you need to implement a predesigned widget that does this automatically, like the following.
http://whatsock.com/tsg/Coding%20Arena/ARIA%20Menus/Variation%20ARIA%20Tree%20With%20Right%20Click/demo.htm
Which includes letter navigation within the currently opened tree level, arrow key navigation, plus Shift+F10 or Applications key ARIA Menu support to match custom right-click menus.

It's important to note that any addition of structural content like headings, images, lists, tables, or any other type of active element that developers attempt to put inside of a role=treeitem container element will not be accessible at all across screen readers, because none of this content will be discoverable. The use of a Tree widget is meant to act as a basic arrow key navigation structure, which works similarly to a Listbox widget where the only focusable nodes allowed within it are those with role=option and no child active elements are allowed. This is why both of these widgets map to 'select'.

This construct has worked accessibly like this since 2012 and in JAWS versions going back to 11 and 12 in IE8 and FF.

One of the biggest issues with the perception that ARIA Trees are not accessible, has to do with badly programmed ARIA Trees that violate these basic concepts. Hopefully this helps a bit.

All the best,
Bryan


Bryan Garaventa
Accessibility Fellow
Level Access, Inc.
<EMAIL REMOVED>
415.624.2709 (o)
www.LevelAccess.com