firefox starts out inaccessible! (assuming default home page)

Bug #802926 reported by Alan Jenkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Confirmed
Unknown
gnome-orca
Fix Released
Medium
gnome-orca (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

0. Make sure orca is enabled, if you haven't already. (Remember this requires logging out and back in again).

1. Close all firefox windows.

2. Start firefox with the default home page, about:startpage
or pass this URL manually - run "firefox about:startpage".
file: URLs also seem to have the same effect. Remote URLs don't - perhaps a timing issue?

3. Orca does not read the window title. It does not read any content. It does not respond to Orca keyboard shortcuts e.g. ins+tab won't tab between form controls (it will just act as normal tab).

4. As soon as you navigate firefox to a different page, it will become accessible, and Orca will work properly, e.g. Orca will immediately start reading stuff out, ins+tab will tab between form controls only, etc.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gnome-orca 3.0.0-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Tue Jun 28 11:27:28 2011
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 SHELL=/bin/bash
SourcePackage: gnome-orca
UpgradeStatus: Upgraded to natty on 2011-06-19 (8 days ago)

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

As reported on this thread:

https://mail.gnome.org/archives/orca-list/2011-March/msg00033.html

Sometimes orca cannot navigate for the google webpage when firefox has been just launched with google.com as its homepage. Next pages or reloads work fine.

That may happen because orca is not getting the document:load-complete event (our EVENT_DOCUMENT_LOAD_COMPLETE).

I cannot reproduce it here, but I'm investagating it

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

I finally found a way to reproduce it.

It happens when firefox window is not focused when launched. I can do this under GNOME for example having a terminal window with the "always on top" activated and launching firefox from a panel launcher or Alt+F2 dialog. In that case firefox opens, requests the focus to the window manager (metacity won't give it because of the focus stealing prevention) and no document:load-complete is fired.

Doing the same with firefox 3.6 and it fires the document:load-complete

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

However this happens to me with any home page.

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Actually we are not firing _any_ event until the window is focused.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #3)
> Actually we are not firing _any_ event until the window is focused.

on atk I guess? We should change that, correct?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Humm, not sure. What happens is that we do not create the accessible tree until the window gets activated. In gtk that happens after:

nsWindow::OnContainerFocusInEvent --> DispatchActivateEventAccessible --> DispatchEventToRootAccessible(nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE)

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

On the another hand if we handle notification then document accessible should be created and we shouldn't miss any event. Do we or atk ignores events until window active event isn't handled?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

We are not even creating nsApplicationAccessibleWrap.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #7)
> We are not even creating nsApplicationAccessibleWrap.

nsAccplicationAccessible is created on demand (for example, when root accessible is created), but why do you say "even"?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Because in gtk/atk we are not creating _any_ accessible element until we get the first DispatchEventToRootAccessible(nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE)
that triggers:

accService->GetRootDocumentAccessible
  nsAccessNode::GetApplicationAccessible
    nsApplicationAccessibleWrap
      nsApplicationAccessible
        ...

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #9)
> Because in gtk/atk we are not creating _any_ accessible element until we get
> the first
> DispatchEventToRootAccessible(nsIAccessibleEvent::EVENT_WINDOW_ACTIVATE)
> that triggers:

do you mean nobody request for accessibility service before this, correct?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

(In reply to comment #10)
> do you mean nobody request for accessibility service before this, correct?

Yes

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

Can we detect that accessibility is enabled or presence of AT?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Yes, actually we are checking it at atk nsApplicationAccessibleWrap::Init and gtk nsWindow::Create to call CreateRootAccessible. That last call looks like the guilty here.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

nsWindow::Create is called too late?

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

no, when nsWindow::Create is called, nsWindow::CreateRootAccessible tries to get the accesible with nsWindow::DispatchAccessibleEvent, but at nsWebShellWindow::HandleEvent docShell is null, so it never calls to presShell->HandleEventWithTarget for getting the accessible.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

Robert, we try to create document accessible when window is created (http://mxr.mozilla.org/mozilla-central/source/widget/src/gtk2/nsWindow.cpp#4205) by sending accessible event (nsIWidget::DispatchEvent) but nsWebShellWindow is not ready to handle events yet (per comment #15). Can we send an accessible event later when we can be sure it can processed correctly?

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

Fernando, sounds like regression, could you please check?

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

Can you make nsWebShellWindow::HandleEvent handle the event itself?

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #18)
> Can you make nsWebShellWindow::HandleEvent handle the event itself?

Yes, but it's neccessary to get nsIDocument associated with the window (also it should pass conditions in http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsAccDocManager.cpp#414, in case of timing issues). Is there a way since docshell is not initialized yet?

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

No. Maybe you should send the event when the nsPresShell for the root document is created?

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #20)
> No. Maybe you should send the event when the nsPresShell for the root document
> is created?

does it guarantee the widget (native window) is created at this point?

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

Yes I think so.

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

Another option, maybe an easier one, is to send the event when we first show a toplevel window in nsIWidget::Show.

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

With this one, a11y tree is not created without focus:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2009/09/2009-09-16-03-mozilla-central/

However, this one:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2009/09/2009-09-15-03-mozilla-central/

creates it because it forces the window to get the focus and a11y tree is created. This forcing focus thing is hiding want we want to know without debugging every build. As 3.6 is not forcing the focus, I'll try going back to check is the change is not hidden.

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

This is the related change stopping the window activation:

http://hg.mozilla.org/mozilla-central/rev/329ff0fcd420

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

So before this change:

http://hg.mozilla.org/mozilla-central/rev/cabb8925dcd3

(that forced window activation) we were not creating the a11y tree, that makes me wonder why 3.6.14 is not forcing window activation but creating the tree on time.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

If there's no any problem with absent window activation on focus, then I suggest to follow Robert suggestion from comment #23.

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Created attachment 518335
Create Root accesible onShow

Something like this should work.

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

BTW can we have an automated test for this?

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

(In reply to comment #29)
> BTW can we have an automated test for this?

perhaps tests on Orca side would work, especially if we want to get tinderbox for that.

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

I think testing on the orca side would work better, as we cannot really prevent window having focus on mochitest (but running with orca/other app window on top can do it)

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :
Revision history for this message
In , Fernando Herrera (fherrera) wrote :

According to this user feedback:

http://mail.gnome.org/archives/orca-list/2011-May/msg00431.html

it fixes the main problem, but introduces some other problem. So it would need further investigation/testing.

Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

Fernando, are you sure these problems are related? If I read the user feedback right then he tells about broken accessible name. I think it's worth to file follow up for this.

Marco, doesn't the issue sound familiar to you?

Revision history for this message
Alan Jenkins (aj504) wrote :
Changed in gnome-orca:
importance: Unknown → Medium
status: Unknown → New
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-orca:
status: New → Fix Released
Revision history for this message
In , Alexander Surkov (surkov-alexander) wrote :

Trevor, could you look at comment #33 please? Is it related with this bug?

Revision history for this message
Alan Jenkins (aj504) wrote :

This bug is still present in 11.10

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 802926] Re: firefox starts out inaccessible! (assuming default home page)

Hi Alan. Did you upgrade from 11.04 to 11.10, or is it a fresh install? I am working on a fresh 11.10 install here, and firefox works fine for me.

Luke

Revision history for this message
Alan Jenkins (aj504) wrote :

Ah. I botched my te-testing of orca. (Both here, and on bug #841786). The test I gave in this bug now works correctly, in 11.10. (I upgraded from 10.04)..

Changed in gnome-orca (Ubuntu):
status: New → Confirmed
Alan Jenkins (aj504)
Changed in gnome-orca (Ubuntu):
status: Confirmed → Fix Released
Changed in firefox:
status: Confirmed → Unknown
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as `INCOMPLETE`.

For more information, please visit [auto_nag documentation](https://wiki.mozilla.org/Release_Management/autonag#inactive_ni_pending.py).

Changed in firefox:
importance: Medium → Unknown
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.