Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#4828 closed defect (fixed)

setting and unsetting a wai role should preserve existing roles

Reported by: davidb Owned by: Becky Gibson
Priority: high Milestone: 1.2
Component: Accessibility Version: 0.9
Keywords: Cc: simonjb, Becky Gibson, davidb
Blocked By: Blocking:

Description (last modified by Becky Gibson)

For background see: http://lists.w3.org/Archives/Public/wai-xtech/2007Sep/0133.html

After some investigation it appears the best we can do right now is to try and make sure:

  1. we preserve existing non-aria-widget roles
  2. we use one aria-widget role
  3. the aria-widget role is first in the list of roles.

Attachments (2)

4828.patch (5.3 KB) - added by Becky Gibson 12 years ago.
updates to append ARIA role to existing role
4828a.patch (8.9 KB) - added by Becky Gibson 11 years ago.
updated based on recommendations in ticket

Download all attachments as: .zip

Change History (14)

comment:1 Changed 12 years ago by davidb

Milestone: 1.01.1

Setting to 1.1 as per Becky chat.

comment:2 Changed 12 years ago by Becky Gibson

Status: newassigned

comment:3 Changed 12 years ago by Becky Gibson

Status: assignednew

sent note to ARIA folks seeking clarification:

I'm not sure how to accomplish this. Is there a fixed set of non-aria roles that I can compare against? I assume the list of non-aria roles would be shorter than the list of aria ones! However, without checking a list of aria roles I have no way to insure that only one aria role is set. Thus, I am not planning to implement the check for #2. I was also only planning to implement this check for Firefox 3.

Is there a list of non-aria roles? Is this just the set of roles in the XHTML role attribute module (http://www.w3.org/TR/xhtml-role/)? What if they are extended?

comment:4 Changed 12 years ago by Becky Gibson

Description: modified (diff)

There is no longer a requirement that the aria role be first. So task 3 in the list above can be removed.

comment:5 Changed 12 years ago by Becky Gibson

After discussions with ARIA folks I just need to make certain that any existing roles are preserved when an aria role gets added

comment:6 Changed 12 years ago by Becky Gibson

Status: newassigned

Changed 12 years ago by Becky Gibson

Attachment: 4828.patch added

updates to append ARIA role to existing role

comment:7 Changed 12 years ago by simonjb

Becky, David, Joseph, and I were chatting. Here is a summary:

Model the API on the Dojo class API:

  • dojo.hasClass(elem, class)
  • dojo.addClass(elem, class)
  • dojo.removeClass(elem, class)
  • (probably don't want equivalent of dojo.toggleClass)

The new role API:

  • dijit.hasWaiRole(elem, role) -- boolean, true if has specified aria role and false if not; if no role specified then true if has role attribute -- but don't document this behaviour -- only for backwards compatibility
  • dijit.addWaiRole(elem, role) -- appends role
  • dijit.removeWaiRole(elem, role) -- removes specified role; removes role attribute if role not specified (for backwards compatibility)
  • dijit.setWaiRole(elem, role) -- destructive -- removes all existing roles (must be clear to document this) -- deprecate?
  • dijit.getWaiRole(elem) -- modify to return first role, deprecate

comment:8 Changed 12 years ago by Becky Gibson

Milestone: 1.11.2
Status: assignednew

this isn't critical for 1.1 so moving to 1.2

comment:9 Changed 11 years ago by Becky Gibson

Description: modified (diff)
Status: newassigned

Changed 11 years ago by Becky Gibson

Attachment: 4828a.patch added

updated based on recommendations in ticket

comment:10 Changed 11 years ago by davidb

Cc: davidb added

comment:11 Changed 11 years ago by Becky Gibson

Resolution: fixed
Status: assignedclosed

(In [14496]) fixes #4828 Modified xxxWaiRole apis to support XHTML roles in FF3. in FF3 setWaiRole will remove any non-XHTML roles and append new role to any existing XHTML roles. In other browers setWaiRole will overwrite role attribute with new role. hasWaiRole(elem, role) will return true if particular role exists. hasWaiRole(elem) will return true if any non-XHTML roles exist. Need to supoprt XHTML roles because screen readers support them.

comment:12 Changed 11 years ago by Becky Gibson

(In [14566]) refs #4828 updated to NOT deprecate getWaiRole. Instead getWaiRole will return any non-XHTML role for an element and empty string if element does not have a WAI role. Modified hasWaiRole to use getWaiRole. Updated tests.

Note: See TracTickets for help on using tickets.