Closed
Bug 481114
Opened 15 years ago
Closed 15 years ago
map timer, log and marquee ARIA roles into a11y roles.
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
VERIFIED
FIXED
People
(Reporter: surkov, Assigned: davidb)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 4 obsolete files)
24.37 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
spun off bug 463645 comment #13.
Assignee | ||
Comment 1•15 years ago
|
||
Engaging the community on this one: http://lists.w3.org/Archives/Public/wai-xtech/2009Mar/0058.html
Assignee | ||
Comment 2•15 years ago
|
||
I think Marco is right, for something like <table role="log"> we shouldn't override the html role (but still do the aria live stuff).
Assignee | ||
Comment 3•15 years ago
|
||
A little while back I checked with WAI-PF and there is no resistance with us using the native role for something like <table role="log">. I even got a few supportive replies. A possible heuristic for nsAccessible::GetRole falling through to GetRoleInternal (native markup), is checking for the presence of aria-live. I wonder if we should fall through if ROLE_NOTHING and mRoleMapEntry->liveAttRule
Assignee: nobody → david.bolter
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•15 years ago
|
||
Attachment #377490 -
Flags: review?(surkov.alexander)
Attachment #377490 -
Flags: review?(marco.zehe)
Assignee | ||
Comment 5•15 years ago
|
||
Sorry comment #3 wasn't quite finished, but the patch finishes my point :)
Reporter | ||
Comment 6•15 years ago
|
||
I would say let's introduce field for landmark in nsRoleMapEntry
Assignee | ||
Comment 7•15 years ago
|
||
Alex, is this what you are thinking? It is a bit more bloat, but clearer and less fragile I think.
Attachment #377490 -
Attachment is obsolete: true
Attachment #377736 -
Flags: review?(surkov.alexander)
Attachment #377736 -
Flags: review?(marco.zehe)
Attachment #377490 -
Flags: review?(surkov.alexander)
Attachment #377490 -
Flags: review?(marco.zehe)
Reporter | ||
Updated•15 years ago
|
Attachment #377736 -
Flags: review?(surkov.alexander)
Reporter | ||
Comment 8•15 years ago
|
||
Comment on attachment 377736 [details] [diff] [review] patch Yes, that what I was thinking of. > PRUint32 nsARIAMap::gWAIRoleMapLength = NS_ARRAY_LENGTH(nsARIAMap::gWAIRoleMap); > > nsRoleMapEntry nsARIAMap::gLandmarkRoleMap = { > "", > nsIAccessibleRole::ROLE_NOTHING, >+ eUseMapRole, landmarks do not override native role iirc. > nsRoleMapEntry nsARIAMap::gEmptyRoleMap = { > "", > nsIAccessibleRole::ROLE_NOTHING, >+ eUseMapRole, > eNoValue, please confirm it's true for empty role (jast a bit lazy to dig through the code :) ). >- return mDOMNode ? >- GetRoleInternal(aRole) : >- NS_ERROR_FAILURE; // Node already shut down >+ return GetRoleInternal(aRole); GetRoleInternal does't check on defunct and GetRole() as well. > >- testRole(accTable4, ROLE_NOTHING); // XXX: it's a bug, should be ROLE_TABLE >+ testRole(accTable4, ROLE_TABLE); would be nice to have more tests, in separate test I think. Btw, new enum is boolean actually so it will be possible clearer if you use boolean overrideNativeRole flag instead.
Comment 9•15 years ago
|
||
Comment on attachment 377736 [details] [diff] [review] patch This fixes the ChatZilla problem on 3.6a1pre nightly builds. Looks correct! r=me
Attachment #377736 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 10•15 years ago
|
||
(In reply to comment #8) > (From update of attachment 377736 [details] [diff] [review]) > GetRoleInternal does't check on defunct and GetRole() as well. Actually I added an IsDefunct check in GetRole in this patch ;) I'll try to address the other comments in the next patch. (In reply to comment #9) > (From update of attachment 377736 [details] [diff] [review]) > This fixes the ChatZilla problem on 3.6a1pre nightly builds. Looks correct! > r=me Thanks for confirming the fix Marco :)
Assignee | ||
Comment 11•15 years ago
|
||
(In reply to comment #8) > landmarks do not override native role iirc. Right. Fixed in my tree thanks. > please confirm it's true for empty role (jast a bit lazy to dig through the > code :) ). Yeah I mixed empty and landmark up. I've switched them. Thanks! > would be nice to have more tests, in separate test I think. I'll add some.
Assignee | ||
Comment 12•15 years ago
|
||
Spun off bug 493795 for a comprehensive treatment of landmark testing.
Assignee | ||
Comment 13•15 years ago
|
||
You guys are awesome. OK so the only ROLE_NOTHING here that doesn't pick up the native role is "presentation"; which makes sense right? Surkov, I made the role rule a boolean in case it saves us some bytes.
Attachment #377736 -
Attachment is obsolete: true
Attachment #379293 -
Flags: review?(surkov.alexander)
Attachment #379293 -
Flags: review?(marco.zehe)
Updated•15 years ago
|
Attachment #379293 -
Flags: review?(marco.zehe) → review+
Comment 14•15 years ago
|
||
Comment on attachment 379293 [details] [diff] [review] patch2 r=me
Assignee | ||
Comment 15•15 years ago
|
||
I went ahead and added tests (bug 493795).
Attachment #379293 -
Attachment is obsolete: true
Attachment #379580 -
Flags: review?(surkov.alexander)
Attachment #379580 -
Flags: review?(marco.zehe)
Attachment #379293 -
Flags: review?(surkov.alexander)
Comment 16•15 years ago
|
||
Comment on attachment 379580 [details] [diff] [review] patch 2, with tests r=me, cool thanks!
Attachment #379580 -
Flags: review?(marco.zehe) → review+
Reporter | ||
Comment 17•15 years ago
|
||
log -> kUseNativeRole - sounds correct, used on HTML tables. Btw, why do we need to have role="log" on table?
marquee, timer -> kUseNativeRole - you are trying to keep lesser changes, it's ok but how much is this correct?
gEmptyRoleMap -> kUseNativeRole - wrong, it should use kUseMapRole
+ // Role rule to be used for weak roles (i.e. ROLE_NOTHING)
What does it mean, does ARIA log role is also weak role? Btw, roleRule flag is defined for all roles.
> *aRole = nsIAccessibleRole::ROLE_NOTHING;
initialize it before IsDefunct() check.
Would be nice to rethink comment for
if (mRoleMapEntry->roleRule == kUseMapRole) {
+ // Note if we do expose ROLE_NOTHING, like with landmarks, this
we do not expose nothing role for landmarks, it's more clean to say what we do and why we do instead of what we would do.
+ test_aria_vs_native_role.html \
probably test_aria_roles to be more consistent with mochitests names?
+ // "live" roles
would be nice to have something more descriptive. I get you now but I won't get this comment in half of year.
I like to have tests for empty role map
otherwise is good.
Comment 18•15 years ago
|
||
(In reply to comment #17) > log -> kUseNativeRole - sounds correct, used on HTML tables. Btw, why do we > need to have role="log" on table? a) role="log" implies aria-live="polite". In other words, someone using the role of "log" does not need to specify aria-live="polite", they get it by default. b) ChatZilla uses that. But I believe role="log" could be used on any element, ChatZilla was just the "example in the wild" if you will.
Assignee | ||
Comment 19•15 years ago
|
||
(In reply to comment #18) > (In reply to comment #17) > > log -> kUseNativeRole - sounds correct, used on HTML tables. Btw, why do we > > need to have role="log" on table? > > a) role="log" implies aria-live="polite". In other words, someone using the > role of "log" does not need to specify aria-live="polite", they get it by > default. > b) ChatZilla uses that. But I believe role="log" could be used on any element, > ChatZilla was just the "example in the wild" if you will. Right, I wanted our mochitest to cover the chatzilla case. (In reply to comment #17) Thanks Alexander, I'll work up a another patch later.
Reporter | ||
Comment 20•15 years ago
|
||
(In reply to comment #19) > Right, I wanted our mochitest to cover the chatzilla case. partially you cover it : testRole("log_table", ROLE_TABLE); Do you want to test aria-live also? (In reply to comment #19) > (In reply to comment #17) > Thanks Alexander, I'll work up a another patch later. you're welcome. thank you.
Assignee | ||
Comment 21•15 years ago
|
||
(In reply to comment #17) > marquee, timer -> kUseNativeRole - you are trying to keep lesser changes, it's > ok but how much is this correct? I think it is correct. > gEmptyRoleMap -> kUseNativeRole - wrong, it should use kUseMapRole > > + // Role rule to be used for weak roles (i.e. ROLE_NOTHING) > > What does it mean, does ARIA log role is also weak role? Btw, roleRule flag is > defined for all roles. Comment updated. (re: log, yes weak :) see step 3 of http://www.w3.org/WAI/PF/aria-implementation/#mapping_role) > > *aRole = nsIAccessibleRole::ROLE_NOTHING; > > initialize it before IsDefunct() check. Right, done. > Would be nice to rethink comment for > > if (mRoleMapEntry->roleRule == kUseMapRole) { > > + // Note if we do expose ROLE_NOTHING, like with landmarks, this > > we do not expose nothing role for landmarks, it's more clean to say what we do > and why we do instead of what we would do. This section had a really confusing comment to start with, I've simplified it in this patch, thanks. > > + test_aria_vs_native_role.html \ > > probably test_aria_roles to be more consistent with mochitests names? Sure, done. > > + // "live" roles > > would be nice to have something more descriptive. I get you now but I won't get > this comment in half of year. Updated :) > > I like to have tests for empty role map How? I see one strange case in nsAccessibilityService where we use gEmptyRoleMap... what case is this? (Follow up table bug?) (In reply to comment #20) > (In reply to comment #19) > > > Right, I wanted our mochitest to cover the chatzilla case. > > partially you cover it : testRole("log_table", ROLE_TABLE); Do you want to > test aria-live also? Not here :) Note the live attribute for log is already checked in test_objectattrs.html Thanks.
Attachment #379580 -
Attachment is obsolete: true
Attachment #379917 -
Flags: review?(surkov.alexander)
Attachment #379580 -
Flags: review?(surkov.alexander)
Reporter | ||
Comment 22•15 years ago
|
||
(In reply to comment #21) > > I like to have tests for empty role map > > How? I see one strange case in nsAccessibilityService where we use > gEmptyRoleMap... what case is this? (Follow up table bug?) new bug is not necessary I think, it should be easy like <table role="label"> <tr> <td id="cell">cell</td> </tr> </table> testRole("cell", ROLE_NOTHING); if I read code right way.
Reporter | ||
Comment 23•15 years ago
|
||
Comment on attachment 379917 [details] [diff] [review] patch 3 nice, r=me, just please add test for gEmptyRoleMap.
Attachment #379917 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 24•15 years ago
|
||
Added locally and confirmed it tests gEmptyRoleMap. Thanks!
Assignee | ||
Comment 25•15 years ago
|
||
Pushed! http://hg.mozilla.org/mozilla-central/rev/f2f7d5625759
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 26•15 years ago
|
||
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090618 Minefield/3.6a1pre (.NET CLR 3.5.30729)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•