Opened 14 years ago
Closed 14 years ago
#7998 closed defect (fixed)
[patch] [cla] dijit.Tree lacks aria-expanded state.
Reported by: | Joseph Scheuhammer | Owned by: | Becky Gibson |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Accessibility | Version: | 1.2.0 |
Keywords: | aria state expanded | Cc: | davidb |
Blocked By: | Blocking: |
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 (1)
Change History (4)
comment:1 Changed 14 years ago by
Component: | General → Accessibility |
---|---|
Owner: | changed from anonymous to Becky Gibson |
Changed 14 years ago by
Attachment: | 7998.patch added |
---|
comment:2 Changed 14 years ago by
Summary: | dijit.Tree lacks aria-expanded state. → [patch] [cla] dijit.Tree lacks aria-expanded state. |
---|
comment:3 Changed 14 years ago by
Milestone: | tbd → 1.3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
fixed in [15630] from clown (ATRC ccla on file)
The following patch, "7998.patch", adds the necessary mods to dijit._TreeNode in Tree.js. Whenever the tree root node's aria-expanded state is updated, likewise the tree dom node's aria-expanded state.