Closed
Bug 463645
Opened 16 years ago
Closed 15 years ago
container-live object attribute should reflect role as well
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(1 file, 1 obsolete file)
26.94 KB,
patch
|
davidb
:
review+
|
Details | Diff | Splinter Review |
We expose the computed politeness (aria-live) value for any given node via container-live. This is calculated here: http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsAccUtils.cpp#278 It should really check the current role as it traverses the tree. The following roles have a default aria-live property value: timer: "off" log: "polite" status: "polite" marquee: "off"
Reporter | ||
Comment 1•16 years ago
|
||
The current code is: 278 if (live.IsEmpty() && 279 ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live, live)) 280 SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live); I believe it should be something like: if (live.IsEmpty()) { if (ancestor->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_live, live)) SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live); else if (ancestor->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::role)) { nsRoleMapEntry *role = GetRoleMapEntry(ancestor); if (role && role->defaultLiveProp) live = role->defaultLiveProp; SetAccAttr(aAttributes, nsAccessibilityAtoms::containerLive, live); } } } Then, each role map entry needs an extra defaultLiveProp field. It would be nsnull in most cases. We'd need to add a new entry for "log", "timer" and "marquee". I guess they'd need a role of ROLE_NOTHING. We'd need a better test to see if something is a landmark though. Right now we just look to see if it equals gLandmarkRoleMap. http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsAccessible.cpp#1924 But we need a better test for that anyway because of bug 459395.
Assignee | ||
Comment 2•15 years ago
|
||
Should we expose "live" object attribute on accessible itself?
Reporter | ||
Comment 3•15 years ago
|
||
Surkov, I'd say yes.
Assignee | ||
Comment 4•15 years ago
|
||
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #362549 -
Flags: review?(david.bolter)
Assignee | ||
Updated•15 years ago
|
Attachment #362549 -
Flags: review?(marco.zehe)
Updated•15 years ago
|
Attachment #362549 -
Flags: review?(marco.zehe) → review+
Comment 5•15 years ago
|
||
Comment on attachment 362549 [details] [diff] [review] patch r=me.
Comment 6•15 years ago
|
||
Comment on attachment 362549 [details] [diff] [review] patch Great, just a few questions first: >+ "log", >+ nsIAccessibleRole::ROLE_NOTHING, (FYI, Marco talked about exposing a log as a table (see bug 469688), but maybe that only makes sense if there is table html markup? In any case, that work probably doesn't belong on this bug) >+enum ELiveAttrRule >+{ >+ eNoLiveAttr, >+ eOffLiveAttr, >+ ePoliteLiveAttr >+}; >+ (I notice the specs still talk about aria-live=assertive) > // Value mapping rule: how to compute nsIAccessible value > EValueRule valueRule; > > // Action mapping rule, how to expose nsIAccessible action > EActionRule actionRule; >+ >+ // Default value of aria-live attribute >+ ELiveAttrRule liveAttrDefValue; Is this a rule or a value? Your other ERules have variables with "Rule" suffixes. I'm not saying to change it, but maybe you could explain this? >+ if (mRoleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING) { >+ // We can now expose ROLE_NOTHING when there is a role map entry or used >+ // role is nothing, which What does "used role is nothing" mean here? >+ // If there is no aria-live attribute then expose default value of 'live' >+ // object attribute used for ARIA role of this accessible. Nit: Why is 'live' in quotes here?
Updated•15 years ago
|
Attachment #362549 -
Flags: review?(david.bolter)
Comment 7•15 years ago
|
||
(In reply to comment #6) > (From update of attachment 362549 [details] [diff] [review]) > >+ // If there is no aria-live attribute then expose default value of 'live' > >+ // object attribute used for ARIA role of this accessible. > > Nit: Why is 'live' in quotes here? Nevermind this question -- it suddenly made sense to me :)
Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #6) > (FYI, Marco talked about exposing a log as a table (see bug 469688), but maybe > that only makes sense if there is table html markup? In any case, that work > probably doesn't belong on this bug) We will expose it as table if there is html table markup for example. We shouldn't expose it as table originally I think. > (I notice the specs still talk about aria-live=assertive) Yes, but in the meantime we don't need it (I used cases defined in bug description). > >+ // Default value of aria-live attribute > >+ ELiveAttrRule liveAttrDefValue; > > Is this a rule or a value? Your other ERules have variables with "Rule" > suffixes. I'm not saying to change it, but maybe you could explain this? Ok, I changed it to rule and changed some comments to make thing a bit clear. Though the question is it rule or value is question of terms I guess. Technically I like to use "rule" here because we do this above. > > >+ if (mRoleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING) { > >+ // We can now expose ROLE_NOTHING when there is a role map entry or used > >+ // role is nothing, which > > What does "used role is nothing" mean here? either role nothing or landmark which has role nothing as well. If we have role nothing here then we should allow to get role from native markup.
Assignee | ||
Comment 9•15 years ago
|
||
Attachment #362549 -
Attachment is obsolete: true
Attachment #362834 -
Flags: review?(david.bolter)
Updated•15 years ago
|
Attachment #362834 -
Flags: review?(david.bolter) → review+
Comment 10•15 years ago
|
||
Comment on attachment 362834 [details] [diff] [review] patch2 Thanks. r=me
Assignee | ||
Comment 11•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b13b71bf3ab9
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Comment 12•15 years ago
|
||
I backuped one line (http://hg.mozilla.org/mozilla-central/rev/07c015cadf15) - if (mRoleMapEntry != &nsARIAMap::gLandmarkRoleMap) { + if (mRoleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING) { button name tests fails because role presentation used on button has nothing role but it's not landmark, we shouldn't allow to calculate name from subtree of presentation button but we do with this line.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 13•15 years ago
|
||
timer: inherited from status, should have ROLE_STATUSBAR (missed in ARIA impl guide) log: inherited from region, should have ROLE_PANE (missed in ARIA impl guide) status: ROLE_STATUSBAR (corresponds to ARIA impl guide) marquee: inherited from section, should have ROLE_PANE (corresponds to ARIA impl guide) Before this bug timer, log, status and marquee had role nothing and timer, log and marquee allowed to get role from native markup. Iirc the fact accessible with log role gets role from native markup is used in chatzilla so I could regress it. Can we clarify what ARIA roles 1) should have own role 2) should have default role (that can be overridden by role from native markup) 3) should have no role (role nothing) 4) should allow to get name from subtree.
Assignee | ||
Comment 14•15 years ago
|
||
Any feedback on comment #13.
Comment 15•15 years ago
|
||
Regarding timer, log, status, and marquee, I think they should all have their own role (your #1 above). I'm not sure about #4 but I would probably lean toward not looking at the subtree for naming any of these. I imagine we'll discuss this in the UAI-TF. Alexander, what do you think?
Assignee | ||
Comment 16•15 years ago
|
||
Sounds right. Ok let's follow to #1. I filed bug 481114.
Comment 17•15 years ago
|
||
Remaining work fixed via bug 481114
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•