Open Bug 635307 Opened 13 years ago Updated 2 years ago

bogus accessible for native windows

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect

Tracking

()

People

(Reporter: fherrera, Unassigned)

References

Details

Attachments

(1 file)

For native windows, native implementations handle accessible creation.

That is ok for native dialogs, but not for stuff like XUL panels, where we create the proper accessible in our tree and native implementations its own accessible.

An example of this is bug #443097, where we get showing/visible notifications for an accessible object that is not in the tree, and it is not the one we expect.
Blocks: 443097
I have been testing around accessible injection into native windows and, at least, it is not an option for gtk/gail.

It is a little bit hacky:


  void *oldAtkObj = g_object_get_qdata (G_OBJECT (aWindow), g_quark_from_static_string ("gtk-accessible-object"));
  if (oldAtkObj) {
    if (strcmp(G_OBJECT_TYPE_NAME(oldAtkObj), "GailWindow") != 0)
      return;

    g_object_unref (G_OBJECT(oldAtkOjb));
  }
  // Horrible hack
  AtkObject *AtkObj = nsAccessibleWrap::GetAtkObject(aAcc);
  g_object_set_qdata (G_OBJECT (aWindow),
                      g_quark_from_static_string ("gtk-accessible-object"),
                      AtkObj);

but the main problem is that gail objects are not intended to be de-attached from their widgets and they don't remove signal handlers. It's dangerous to keep those callbacks connected even if they check accessible object type and are not executed.

So the other option I can think is passing the DOM node to nsWindow::Create and if we have an accessible for that node, prevent native accessible object creating and attach our.

What do you think?
thinking more about it, setting our accessible object as accessible object for native window won't help for bug #443097, as our gecko accessible objects do not listen to native widgets events, and then we miss native show/hide events for those windows. Native accessible objects take care of those events, so what about of keeping them and "fixing". I'm attaching an exmaple of such fixing function. Yeah, it look like a mess but I cannot figure out other solution.
Assignee: nobody → fherrera
Assignee: fherrera → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: