Opened 13 years ago

Closed 13 years ago

#7997 closed defect (duplicate)

dijit.Tree lacks aria-expanded state.

Reported by: Joseph Scheuhammer Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.2.0
Keywords: aria state expanded Cc: davidb
Blocked By: Blocking:


Tree widgets have an expanded state according to the ARIA spec:

Dijit's tree widget does not support this state. The tree's nodes (dijit._TreeNode) do support aria-expanded (correctly, as per the spec).

The tree does support the aria role:

var tree = dijit.byId('treeId');
dijit.getWaiRole(tree.domNode) == "tree";    // evals to true

Given that the role is stored on the tree's domNode, then I suggest putting aria-expanded on that element as well.

How does one determine if a tree is expanded or collapsed? Trees have a rootNode. If the root is expanded, then so it the tree, and vice versa:

var rootState = dijit.getWaiState(tree.rootNode.labelNode, 'expanded');
dijit.setWaiState(tree.domNode, 'expanded', rootState);

And, whenever the root's expanded state is updated, so to is the tree's.

Change History (1)

comment:1 Changed 13 years ago by Joseph Scheuhammer

Resolution: duplicate
Status: newclosed

Closing, as this is a duplicate of #7998. Sorry, but trac frequently reports an error; here when I created the ticket. But, it appears, one of those failures was actually a success.

Note: See TracTickets for help on using tickets.