Closed Bug 244288 Opened 20 years ago Closed 20 years ago

MSAA's WindowFromAccessibleObject() doesn't work with Mozilla

Categories

(Core :: Disability Access APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

Details

(Keywords: access)

Attachments

(1 file)

MSAA clients such as accevent.exe report the wrong window for Mozilla's
accessible objects, when they use WindowFromAccessibleObject(). They report the
very top UI window even when they're part of the HTML document.

This breaks Window-Eyes as well -- makes them stop in the middle of grabbing our
MSAA tree.
Comment on attachment 149050 [details] [diff] [review]
get_accParent() on document object should return ROLE_WINDOW object 

Seeking r=pkw.

Philip, I realize you don't know this code -- but I'm the only person on the
project who currently understands it anyway.

WindowFromAccessibleObject() works by calling get_accParent(). It expects
get_accParent() to return the accessible for the window at some point. Since
the accessible for the window is actually implemented by Windows itself (we
don't override that one), then we can just use AccessibleObjectFromWindow() on
the current window and return that.

I tested in this indeed fixes the problems with Window-Eyes and accevent.exe.
Attachment #149050 - Flags: review?(pkw)
Comment on attachment 149050 [details] [diff] [review]
get_accParent() on document object should return ROLE_WINDOW object 

>Index: nsDocAccessibleWrap.cpp
>===================================================================
...
>+STDMETHODIMP nsDocAccessibleWrap::get_accParent( IDispatch __RPC_FAR *__RPC_FAR *ppdispParent)
...
>+      // got one? return it.
>+      if (msaaParentAccessible) {
>+        *ppdispParent = msaaParentAccessible;

Can ppdispParent ever be NULL?

Everything else seems fine although I'm not too familiar with MSAA.
Attachment #149050 - Flags: review?(pkw) → review+
Comment on attachment 149050 [details] [diff] [review]
get_accParent() on document object should return ROLE_WINDOW object 

I don't know that it's worth checking the validity of the out parameter
pointers everywhere. I think COM might do that for us. Anyway, if we're getting
null pointers for out params then the calling assistive technology will have
problems with all kinds of software, not just us.
Attachment #149050 - Flags: superreview?(Henry.Jia)
Comment on attachment 149050 [details] [diff] [review]
get_accParent() on document object should return ROLE_WINDOW object 

sr=Henry
Attachment #149050 - Flags: superreview?(Henry.Jia) → superreview+
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: