Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16574 closed defect (fixed)

[PATCH][CCLA] Tree: set aria-label on rootless Trees

Reported by: mikeb Owned by: mikeb
Priority: undecided Milestone: 1.8.4
Component: Dijit Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

[29284] and [28332] correctly set up the roles and attributes for accessibility for dijit.Trees. However, I accidentally forgot about moving the aria-label (or aria-labelledby) attribute to the correct node in the case of a rootless tree. I attached a patch that moves the aria-label (or aria-labelledby) attribute to the correct node (the same node that gets the role=tree attribute.) Also attached some automated test cases.

Attachments (2)

aria-label-rootles-trees-1.8 (4.6 KB) - added by mikeb 7 years ago.
Adds aria-label attribute to rootless trees on 1.8, please commit for Michael Billau CCLA on file
add-aria-label-to-rootless-trees.patch (4.8 KB) - added by mikeb 7 years ago.
Adds aria-label attribute to rootless trees, please commit for Michael Billau CCLA on file

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by bill

Owner: changed from bill to mikeb
Status: newpending

Is there some reason (in Tree.js) you are calling this.domNode.getAttribute("aria-label") instead of just doing this["aria-label"]?

It also seems slightly suboptimal since the user can't change the aria-label or aria-labelled-by after initialization, but probably that won't be a problem in practice.

Changed 7 years ago by mikeb

Adds aria-label attribute to rootless trees on 1.8, please commit for Michael Billau CCLA on file

comment:2 Changed 7 years ago by mikeb

Status: pendingnew

Attachment (aria-label-rootles-trees-1.8) added by ticket reporter.

Changed 7 years ago by mikeb

Adds aria-label attribute to rootless trees, please commit for Michael Billau CCLA on file

comment:3 in reply to:  1 Changed 7 years ago by mikeb

Replying to bill:

Is there some reason (in Tree.js) you are calling this.domNode.getAttribute("aria-label") instead of just doing this["aria-label"]?

No there isn't, using this["aria-label"] is better. I updated the patches.

It also seems slightly suboptimal since the user can't change the aria-label or aria-labelled-by after initialization, but probably that won't be a problem in practice.

I also don't see this happening in practice, but I suppose if you would prefer I can add a setAriaLabelattr method instead.

Last edited 7 years ago by mikeb (previous) (diff)

comment:4 Changed 7 years ago by bill

Milestone: tbd1.8.4
Summary: [PATCH][CCLA] dijit.Tree: set aria-label on rootless Trees[PATCH][CCLA] Tree: set aria-label on rootless Trees

Probably it's not worth the effort. I'll check in your patches as is, thanks.

comment:5 Changed 7 years ago by bill

Resolution: fixed
Status: newclosed

In [30383]:

Fix aria labels for showRoot=false trees, patch from Mike Billau (IBM, CCLA), fixes #16574 on trunk !strict

comment:6 Changed 7 years ago by bill

In [30384]:

Fix aria labels for showRoot=false trees, patch from Mike Billau (IBM, CCLA), fixes #16574 on 1.8 branch !strict

Note: See TracTickets for help on using tickets.