Ticket #7998 (closed defect: fixed)

Opened 2 months ago

Last modified 7 weeks ago

[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

7998.patch (1.0 kB) - added by clown 2 months ago.

Change History

Changed 2 months ago by clown

  • owner changed from anonymous to becky
  • component changed from General to Accessibility

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 2 months ago by clown

Changed 2 months ago by clown

  • summary changed from dijit.Tree lacks aria-expanded state. to [patch] [cla] dijit.Tree lacks aria-expanded state.

Changed 7 weeks ago by becky

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from tbd to 1.3

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

Note: See TracTickets for help on using tickets.