Closed Bug 512561 Opened 15 years ago Closed 15 years ago

Can't set focus to document via accessibility APIs while Adobe Flash plugin has focus

Categories

(Core :: Disability Access APIs, defect, P2)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: Jamie, Assigned: davidb)

References

()

Details

(Keywords: access, regression, verified1.9.2)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20090821 Minefield/3.7a1pre Build Identifier: Once focus moves inside the Adobe Flash plugin, focus cannot be set to the parent Gecko document using accessibility APIs (for MSAA< accSelect with SELFLAG_TAKEFOCUS). This means that there is no way to programmatically return focus to the document. I suspect this applies to plugins other than Flash as well. Reproducible: Always Steps to Reproduce: 1. Visit the provided URL. 2. Move focus inside the Flash plugin; e.g. click the Play/Pause button. 3. Move up the ancestors of the focus accessible to the accessible for the containing document. 4. Try to set focus to this document accessible. Actual Results: The focus does not move. Expected Results: The document accessible should receive focus. This bug is not present in Firefox 3.5.2.
Is this possibly related to bug 512058?
Keywords: access, regression
Version: unspecified → Trunk
Not sure, might also be related to bug 330412 and bug 78414.
I wonder if we fail on !frame->IsFocusable() in nsAccessible::TakeFocus.
Ignore my comment #3. Jamie are you doing an accSelect?
Ugh ignore comment #4. This is punishment for rick-rolling me :)
(In reply to comment #2) > might also be related to bug 330412 and bug 78414. It's certainly related in the sense that without those bugs fixed, this bug is even more important so at least ATs can get focus out of the plugin. :) However, those bugs also weren't fixed in Firefox 3.5.2, but at least set focus to the document used to work.
I suspect this is a regression from the big focus refactor bug 178324 as well.
Blocks: 178324
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9.2?
Josh, any ideas?
Sorry, I don't have any ideas. Comment #7 seems like the best guess to me.
I suspect that nsDocAccessible::TakeFocus needs to be changed to ensure that the right window is focused just before (or after) it calls MoveFocus. What should nsDocAccessible::TakeFocus be doing? Just focusing a document in an existing toplevel window? Or focusing the document and bringing its window to the front?
(In reply to comment #10) > I suspect that nsDocAccessible::TakeFocus needs to be changed to ensure that > the right window is focused just before (or after) it calls MoveFocus. Yes I think we need to do that. > What should nsDocAccessible::TakeFocus be doing? Just focusing a document in an > existing toplevel window? Or focusing the document and bringing its window to > the front? Given the typical use case, which is an AT user wanted to put focus somewhere for subsequent related activity, I think ensuring the window is front(most) is a Good Idea(tm). Something like: return fm->MoveFocus(document->GetWindow(), nsnull, nsIFocusManager::FLAG_RAISE | nsIFocusManager::MOVEFOCUS_ROOT, 0, getter_AddRefs(newFocus)); Neil, what does nsIFocusManager::MOVEFOCUS_ROOT do when focus is currently in a (flash) plugin?
> Something like: > return fm->MoveFocus(document->GetWindow(), nsnull, > nsIFocusManager::FLAG_RAISE | > nsIFocusManager::MOVEFOCUS_ROOT, 0, > getter_AddRefs(newFocus)); Should work. > Neil, what does nsIFocusManager::MOVEFOCUS_ROOT do when focus is currently in a > (flash) plugin? It should do the same thing, focus the root of the document.
Assignee: nobody → bolterbugz
Status: NEW → ASSIGNED
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
That was a red herring. Debugging... looks like mDOMNode->GetOwnerDocument(getter_AddRefs(domDocument)) fails (domDocument is null).
Got it! Patch coming after lunch :)
Attached patch patch 1Splinter Review
Get the nsIDOMDocument directly from the nsDocAccessible's dom node since this will succeed in more cases. GetOwnerDocument returns null if the caller node is in fact a document (this is probably new behaviour). Jamie, nice catch.
Attachment #402856 - Flags: review?(marco.zehe)
Forgot to mention I confirmed this fixes the bug as described.
Comment on attachment 402856 [details] [diff] [review] patch 1 Great! r=me
Attachment #402856 - Flags: review?(marco.zehe) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Let's bake it a bit before considering landing on 1.9.2
Verified fixed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20090929 Minefield/3.7a1pre (.NET CLR 3.5.30729)
Status: RESOLVED → VERIFIED
Verified in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2b1pre) Gecko/20090930 Namoroka/3.6b1pre (.NET CLR 3.5.30729)
Keywords: verified1.9.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: