Firefox package prevents Orca and LSR from reading web content in Firefox and Epiphany

Bug #66720 reported by Benjamin Hawkes-Lewis
4
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
epiphany-browser (Ubuntu)
Invalid
Undecided
Unassigned
firefox (Ubuntu)
Invalid
Undecided
Unassigned
gnome-orca (Ubuntu)
Invalid
Undecided
Unassigned
lsr (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

1. Start Orca
2. Enable Braille Monitor under Orca preferences.
3. Start Gnome Terminal
4. In Terminal, execute "export GTK_MODULES=" (I explain why below).
5. In Terminal, execute "firefox"
6. Visit a webpage
7. Press F7 and select OK to enable caret browsing mode.
8. A caret should now be visible in the web page. As you move it around with the arrow keys, Orca should read the web page text. But this doesn't happen! Orca remains silent.

NB: GTK_MODULES is set to null because of the following Firefox bug, which causes Orca to sometimes reads "PANEL" instead of the web page content:

https://bugzilla.mozilla.org/show_bug.cgi?id=339554

See also:

https://bugzilla.mozilla.org/show_bug.cgi?id=341463

Sadly, this would be difficult to make a default setting since it also breaks the file picker:

https://bugzilla.mozilla.org/show_bug.cgi?id=332660

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

gail_container_real_initialize is called when firefox creates a window
and gail_widget_real_focus_gtk is called when the window is focused

We should allow gail do that to firefox managed window.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

Created attachment 223673
patch

gok is doing the same thing to avoid self-occlusion.

I also verified this patch with gok, it doesn't break firefox gok functionality.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 223673
patch

I guess this should be harmless...

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

Checking in mozdrawingarea.c;
/cvsroot/mozilla/widget/src/gtk2/mozdrawingarea.c,v <-- mozdrawingarea.c
new revision: 1.17; previous revision: 1.16
done

Revision history for this message
In , Peter Parente (parente) wrote :

With the trunk nightly from 2006-06-01, now nothing fires a focus event when a dialog opens (e.g. Preferences, Customize character encoding), even when GTK_MODULES is *not* set:

For the preferences dialog:

generic event 'focus:' A:menu item:Preferences:(0) (0)
window event 'window:deactivate' (0) (0) on A:frame:Minefield: with title 'Minefield'
window event 'window:activate' (0) (0) on A:dialog:Minefield Preferences: with title 'Minefield Preferences'

For the Customize character encoding dialog:

generic event 'focus:' A:menu item:Customize List...:(0) (0)
window event 'window:deactivate' (0) (0) on A:frame:Minefield: with title 'Minefield'
window event 'window:activate' (0) (0) on A:frame:Customize Character Encoding: with title 'Customize Character Encoding'

Expected behavior is that the control with the focus after the dialog opens should fire a focus event.

Revision history for this message
In , Evan Yan (evan-yan) wrote :

I believe that's another bug, see bug 339210.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

patch backed out

Thanks, parente!

I was messed up with Bug 339634 while testing.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

I didn't find a way to fix it in Mozilla.

What about we fix it in gail?
Let gail_focus_notify/gail_focus_notify_when_idle ignore GtkWidget typed MozContainer.

We can't just let gail down for Firefox, because we'll need it to fix Bug 332660.

Revision history for this message
In , Peter Parente (parente) wrote :

> What about we fix it in gail?
> Let gail_focus_notify/gail_focus_notify_when_idle ignore GtkWidget typed
> MozContainer.

Is this a good long term solution for gail? What about other projects besides Firefox that might run into the same problem (e.g. OpenOffice)?

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

Created attachment 224670
patch (return NULL for MozContainer accessible)

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

After a discussion with Padraig O'Briain (<email address hidden>),
we think the clean way to fix it is to assign a accessible factory for MozContainer, and return NULL for get_accessible.
gail will add a NULL check to avoid emit focus notification.

We need gail's focus_watcher for file_chooser dialog, so we couldn't unload gail or disable its focus_watcher.

Gecko a11y module takes care of accessible tree and events for all mozilla windows, we do not need to use gail to produce AtkObject* for MozContainer.

OOo also has similar problem, but its usage of GTK_CONTAINER is different, the solution is also different.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

Comment on attachment 224670
patch (return NULL for MozContainer accessible)

Bill suggested to not return NULL but return a AtkObject which role is ATK_ROLE_REDUNDANT_OBJECT.

Revision history for this message
In , Aaronleventhal (aaronleventhal) wrote :

Does ATK_REDUNDANT_OBJECT get special treatment in the infrastructure? Or is it the job of an AT to skip over them?

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

Created attachment 224967
patch v2 (use ATK_ROLE_REDUNDANT_OBJECT)

preproccessor for atk versions requires part fix of Bug 340773;
also need to patch gail.c to accomplish the fix.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Shouldn't Aaron review this?

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

+GType
+mai_redundant_object_factory_get_type (void)
+{
+ static GType type = 0;
+
+ if (!type)
+ {
+ static const GTypeInfo tinfo =
+ {
+ sizeof (maiRedundantObjectFactoryClass),
+ (GBaseInitFunc) NULL, /* base init */
+ (GBaseFinalizeFunc) NULL, /* base finalize */
+ (GClassInitFunc) mai_redundant_object_factory_class_init, /* class init */
+ (GClassFinalizeFunc) NULL, /* class finalize */
+ NULL, /* class data */
+ sizeof (maiRedundantObjectFactory), /* instance size */
+ 0, /* nb preallocs */
+ (GInstanceInitFunc) NULL, /* instance init */
+ NULL /* value table */
+ };
+ type = g_type_register_static (
+ ATK_TYPE_OBJECT_FACTORY,
+ "MaiRedundantObjectFactory" , &tinfo, 0);
+ }
+
+ return type;
+}

You can simplify this by writing it as

+GType
+mai_redundant_object_factory_get_type (void)
+{
+ static GType tinfo = ...;
+ static GType type = g_type_register_static(...);

The compiler will take care of your "if" statement.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

roc: I can't change it because initializer element must be constant, but g_type_register_static is not.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

That's not true in C++.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

(In reply to comment #18)
> That's not true in C++.
>

You're right.
But we still can't do it, because we shouldn't call g_type_register_static before gtk_init
It will cause bug 339634. :)

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

It will get executed the first time mai_redundant_object_factory_get_type is called.

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Can you give any thoughts on risk/reward for the 1.8.1 branch for this? How well tested is this patch?

Revision history for this message
In , L. David Baron (dbaron) wrote :

(I'm concerned because while it seems reasonable, it also seems like a pretty big change to what we're exposing in many areas, not just this one case.)

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Given comment 22 - if there a lower-risk variant or a justification for taking the risk on the branch? If not we are not likely to take this at this stage of the release.

Revision history for this message
In , Aaronleventhal (aaronleventhal) wrote :

I'm not sure that we need this for Firefox 2 given that it's already not going to work well on Linux. But if Ginn can justify it for the risk, I'm game.

Revision history for this message
In , Ginn-chen (ginn-chen) wrote :

(In reply to comment #23)
> Given comment 22 - if there a lower-risk variant or a justification for taking
> the risk on the branch? If not we are not likely to take this at this stage of
> the release.
>
I'm sorry for the late.
I'm waiting for Bill Haneman's commit of gail's fix to verify it with gail trunk build.

I think this patch is low risk, and it's useful for some distros.
e.g. Ubuntu 6.06 is setting GTK_MODULES=gail:atk-bridge by default for every application.
Using Firefox with gnopernicus or orca will have this issue.

Revision history for this message
In , Bill-haneman (bill-haneman) wrote :

I don't know why you're waiting for me.
The gail change is in cvs now anyway.

Revision history for this message
In , Beltzner (beltzner) wrote :

Comment on attachment 224967
patch v2 (use ATK_ROLE_REDUNDANT_OBJECT)

Based on Aaron's assertion that the need for this is low on the branch, we're going to pass. Feel free to renominate for a dot release or for Gecko 1.9

Revision history for this message
Benjamin Hawkes-Lewis (benjamin-hawkeslewis) wrote : Orca fails to read web pages in Firefox

1. Start Orca
2. Enable Braille Monitor under Orca preferences.
3. Start Gnome Terminal
4. In Terminal, execute "export GTK_MODULES=" (I explain why below).
5. In Terminal, execute "firefox"
6. Visit a webpage
7. Press F7 and select OK to enable caret browsing mode.
8. A caret should now be visible in the web page. As you move it around with the arrow keys, Orca should read the web page text. But this doesn't happen! Orca remains silent.

NB: GTK_MODULES is set to null because of the following Firefox bug, which causes Orca to sometimes reads "PANEL" instead of the web page content:

https://bugzilla.mozilla.org/show_bug.cgi?id=339554

See also:

https://bugzilla.mozilla.org/show_bug.cgi?id=341463

Sadly, this would be difficult to make a default setting since it also breaks the file picker:

https://bugzilla.mozilla.org/show_bug.cgi?id=332660

Revision history for this message
Benjamin Hawkes-Lewis (benjamin-hawkeslewis) wrote :

Further testing suggests that this bug also affects Epiphany, and also affects LSR. So I think the problem is in the Firefox package. Is there any chance of backporting a fix from Firefox 3 (Minefield)? Or maybe offering some official or quasi-official CVS packages of Epiphany or Firefox?

Changed in firefox:
status: Unknown → Fix Released
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

Yes, it looks like a general Gecko problem, now fixed for Firefox 3. Mozilla don't seem to want yo backport it so we won't either. We should start making builds of FF available somewhere though.

Changed in gnome-orca:
status: Unconfirmed → Rejected
Changed in firefox:
status: Unconfirmed → Rejected
Changed in lsr:
status: Unconfirmed → Rejected
Changed in epiphany-browser:
status: Unconfirmed → Rejected
Revision history for this message
John Vivirito (gnomefreak) wrote :

Henrik i was thinking of making like a firefox-snapshot package example: in feisty you have firefox-2.0.0.1 and have a firefox-snapshot in multiverse of firiefox-3.0a1 or whatever is the latest but not sure if that is gonna help nor work out atm.

Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

John, even if it's not in universe/multiverse we could perhaps put the deb on a server somewhere to download, or e could ask someone with an existing third party repo like Luke or Sevaas to host it.

It could be great for a11y testing so we could give useful feedback to the Mozilla devs while they are still working on these issues.

Revision history for this message
Alexander Sack (asac) wrote :

Henrik, please post a wishlist bug about the snapshot package and assign it to me with state confirmed. I will eventually build it (though probably not before feisty).

Changed in firefox:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.