Opened 11 years ago

Closed 11 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)

7998.patch (1.0 KB) - added by Joseph Scheuhammer 11 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 11 years ago by Joseph Scheuhammer

Component: GeneralAccessibility
Owner: changed from anonymous to Becky Gibson

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.

Changed 11 years ago by Joseph Scheuhammer

Attachment: 7998.patch added

comment:2 Changed 11 years ago by Joseph Scheuhammer

Summary: dijit.Tree lacks aria-expanded state.[patch] [cla] dijit.Tree lacks aria-expanded state.

comment:3 Changed 11 years ago by Becky Gibson

Milestone: tbd1.3
Resolution: fixed
Status: newclosed

fixed in [15630] from clown (ATRC ccla on file)

Note: See TracTickets for help on using tickets.