#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 )
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:
- we preserve existing non-aria-widget roles
- we use one aria-widget role
the aria-widget role is first in the list of roles.
Attachments (2)
Change History (14)
comment:1 Changed 14 years ago by
Milestone: | 1.0 → 1.1 |
---|
comment:2 Changed 13 years ago by
Status: | new → assigned |
---|
comment:3 Changed 13 years ago by
Status: | assigned → 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?
comment:4 Changed 13 years ago by
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 13 years ago by
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 13 years ago by
Status: | new → assigned |
---|
comment:7 Changed 13 years ago by
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 13 years ago by
Milestone: | 1.1 → 1.2 |
---|---|
Status: | assigned → new |
this isn't critical for 1.1 so moving to 1.2
comment:9 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:10 Changed 13 years ago by
Cc: | davidb added |
---|
comment:11 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(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.
Setting to 1.1 as per Becky chat.