Ticket #4828 (closed defect: fixed)

Opened 9 months ago

Last modified 2 days ago

setting and unsetting a wai role should preserve existing roles

Reported by: davidb Owned by: becky
Priority: normal Milestone: 1.2
Component: Accessibility Version: 0.9
Severity: normal Keywords:
Cc: simonjb, becky, davidb

Description (last modified by becky) (diff)

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

4828.patch (5.3 kB) - added by becky 5 months ago.
updates to append ARIA role to existing role
4828a.patch (8.9 kB) - added by becky 8 days ago.
updated based on recommendations in ticket

Change History

Changed 9 months ago by davidb

  • milestone changed from 1.0 to 1.1

Setting to 1.1 as per Becky chat.

Changed 5 months ago by becky

  • status changed from new to assigned

Changed 5 months ago by becky

  • status changed from assigned to new

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?

Changed 5 months ago by becky

  • 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.

Changed 5 months ago by becky

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

Changed 5 months ago by becky

  • status changed from new to assigned

Changed 5 months ago by becky

updates to append ARIA role to existing role

Changed 5 months 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

Changed 5 months ago by becky

  • status changed from assigned to new
  • milestone changed from 1.1 to 1.2

this isn't critical for 1.1 so moving to 1.2

Changed 9 days ago by becky

  • status changed from new to assigned
  • description modified (diff)

Changed 8 days ago by becky

updated based on recommendations in ticket

Changed 8 days ago by davidb

  • cc davidb added

Changed 8 days ago by becky

  • status changed from assigned to closed
  • resolution set to fixed

(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.

Changed 2 days ago by becky

(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.