Ticket #7998 (closed defect: fixed)
[patch] [cla] dijit.Tree lacks aria-expanded state.
| Reported by: | clown | Owned by: | becky |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3 |
| Component: | Accessibility | Version: | 1.2.0 |
| Severity: | normal | Keywords: | aria state expanded |
| Cc: | davidb |
Description
Tree widgets have an expanded state according to the ARIA spec: http://www.w3.org/WAI/PF/aria/#tree
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.