Closed Bug 495624 Opened 15 years ago Closed 13 years ago

accessibility shouldn't be caching the current focus

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: enndeakin, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

From bug 178324, it should instead be retrieved from the focus manager when needed. A cached value is likely to be inaccurate.
Summary: accessibility shouldn't be cached the current focus → accessibility shouldn't be caching the current focus
Depends on: 178324
Keywords: access
OS: Mac OS X → All
Hardware: x86 → All
Blocks: cleana11y
Why don't we use nsDocument::GetActiveElement?

Note Enn comments in our code:

NS_IMETHODIMP nsDocAccessible::GetFocusedChild(nsIAccessible **aFocusedChild)
{
  // XXXndeakin P3 accessibility shouldn't be caching the focus

In any event we should investigate when our cached node is different from what
this API gives us. For cases it should be the same we should add test coverage.
(In reply to comment #1)
> Why don't we use nsDocument::GetActiveElement?

> In any event we should investigate when our cached node is different from what
> this API gives us. 

Yep, it's different, for example, menuitems and etc. I don't have clever idea how we could combine gecko cached focused node with our rules.
Also we cache frame type of the focused node, it's kind of related with cached focused node.
Yeah I keep mid air colliding with you :)

Note we also store:
PRUint32 nsDocAccessible::gLastFocusedAccessiblesState
nsIAtom *nsDocAccessible::gLastFocusedFrameType

We probably need a hybrid of storing what we thought the last focus state was, and asking what currently the focus state is.
fixed by bug 673958
Assignee: nobody → surkov.alexander
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.