After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340577 - GEdit statusbar doesn't expose its children for accessibility
GEdit statusbar doesn't expose its children for accessibility
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
git master
Other Linux
: Normal normal
: ---
Assigned To: Patrick Wade
Li Yuan
Depends on:
Blocks: 407658
 
 
Reported: 2006-05-03 23:53 UTC by Willie Walker
Modified: 2007-05-23 02:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Patch to hopefully fix the problem. (1.67 KB, patch)
2007-05-22 16:33 UTC, Rich Burridge
committed Details | Review

Description Willie Walker 2006-05-03 23:53:05 UTC
When looking at the statusbar in GEdit via the at-poke application, it appears as though one cannot get to any of the textual information in it.  This information is important to people with visual impairments - by making it invisible to the AT-SPI infrastructure, screen readers cannot present it to users.

In digging through the code, it looks as though the status bar is a custom status bar that keeps a couple standard GTK status bars in a private data structure.  Since I don't really understand the semantics behind a status bar, I'm not sure I can recommend a great solution here.  But, perhaps instead of a custom status bar, GEdit could provide a panel that has the standard GTK status bars as children?
Comment 1 Paolo Borelli 2006-05-04 06:25:30 UTC
GtkStatusbar inherits from GtkHBox, so I don't see why using a HBox would make a difference... Maybe it's a bug in the acessibility stack?

Gedit statusbar is a Statusbar so modelling it with inheritance is a good solution for us and I would prefer not to change it: it allows us to do stuff like
gtk_statusbar_push_message (GTK_STATUSBAR(gedit_sbar), "foo") and we avoid aving to wrap all the GtkStatusbar api.
Comment 2 Christian Persch 2006-05-04 10:03:42 UTC
I'd say this is a bug in gail, since it reports no children for a statusbar.

static gint
gail_statusbar_get_n_children (AtkObject          *obj)
{
  /*
   * We report a GailStatusbar as having no children
   */
  return 0;
}
Comment 3 Willie Walker 2006-05-04 11:40:38 UTC
Wow!  Thanks for finding that.  I completely missed it - I'm guessing that the GAIL author didn't expect people to subclass the status bar and stuff children in it.  But, since even buttons can have children, I guess it's perfectly acceptable for status bars to have children and this does look like a gail bug.  I'll reassign this to AT-SPI/GAIL.
Comment 4 Willie Walker 2006-12-12 22:42:18 UTC
> In digging through the code, it looks as though the status bar is a custom
> status bar that keeps a couple standard GTK status bars in a private data
> structure.  Since I don't really understand the semantics behind a status bar,
> I'm not sure I can recommend a great solution here.  But, perhaps instead of a
> custom status bar, GEdit could provide a panel that has the standard GTK status
> bars as children?

Bill - do you have any insight you can provide here?  What should the hierarchy look like for a status bar that has multiple children that display content?  The current gail implementation seems to assume that a statusbar has one label that displays content.  It exposes the statusbar as a childless object that implements the accessible text interface, where the accessible text information comes from the label.

GEdit's custom status bar is a container composed of a hierarchy that looks like the following.  These are just the visible components:

      +-name=None role='statusbar'
        +-name=None role='panel'
          +-name=None role='label'
        +-name='  Ln 1, Col 1' role='statusbar'
          +-name=None role='panel'
            +-name='  Ln 1, Col 1' role='label'
        +-name='  INS' role='statusbar'
          +-name=None role='panel'
            +-name='  INS' role='label'

More components are in there, depending up the status of various things.
Comment 5 bill.haneman 2007-02-14 14:04:38 UTC
I think the simplest and best solution would be to modify GailStatusBar's getChildren implementation to return the actual widget children of the Hbox.

It would then be up the the AT to traverse into the children (or traverse up, i.e. "am I in a statusbar?") in its heuristics, when deciding if/how to present the data.
Comment 6 Harry Lu 2007-02-15 07:53:59 UTC
Patrick, you can have a look at this bug if you like. Should be relatively easy to fix. Maybe just removing the gail_statusbar_get_n_children() function would fix it.
Comment 7 Patrick Wade 2007-02-15 09:06:05 UTC
Harry - OK, thanks.
Comment 8 Willie Walker 2007-04-17 22:16:07 UTC
(In reply to comment #7)
> Harry - OK, thanks.
> 

Patrick -- thanks for looking at this.  It's one of our more nagging problems with GEdit.  Do you have an idea when you might take a look at it?
Comment 9 Rich Burridge 2007-05-22 16:33:11 UTC
Created attachment 88627 [details] [review]
Patch to hopefully fix the problem.

I've attached a patch that hopefully will be close to the required fix.
This seems to work nicely with Orca with the gedit status bar. My concern
is whether it does the right thing for a status bar that doesn't have
any children. 

If somebody can suggest such an application, I'll give this more testing.

Patrick could you please review?

Thanks.

PS: This is a diff against gail v1.18.0