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 482295 - [a11y] Tooltips are no longer exposed as tooltips to ATs
[a11y] Tooltips are no longer exposed as tooltips to ATs
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: gail
0.9
Other All
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
: 481809 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-01 16:44 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2007-11-13 18:55 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch to add check for gtk-tooltip (533 bytes, patch)
2007-10-02 14:33 UTC, Willie Walker
none Details | Review
Patch that actually works. :-) (1.89 KB, patch)
2007-10-03 12:24 UTC, Willie Walker
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2007-10-01 16:44:28 UTC
Prior to the recent refactoring of tooltips, tooltips were exposed to assistive technologies as objects with ROLE_TOOL_TIP.  Now they're exposed as objects with ROLE_WINDOW.  

Knowing for certain that the window in question is indeed a tooltip enables ATs to provide far more reliable access to them.  Can the original role be restored?

Thanks!
Comment 1 Tim Janik 2007-10-01 17:55:01 UTC
(In reply to comment #0)
> Prior to the recent refactoring of tooltips, tooltips were exposed to assistive
> technologies as objects with ROLE_TOOL_TIP.  Now they're exposed as objects
> with ROLE_WINDOW.  
> 
> Knowing for certain that the window in question is indeed a tooltip enables ATs
> to provide far more reliable access to them.  Can the original role be
> restored?

Kris, i think this is simply asking for adding:
  gtk_window_set_type_hint (tooltip_window, GDK_WINDOW_TYPE_HINT_TOOLTIP);
to the new tooltip code.

however grepping the new code, we already seem to be doing that in the single place i find in gtktooltip.c that constructs a window...

Joanmarie, do you still miss HINT_TOOLTIP being set for Gtk+ tooltips with recent SVN (today or later)?

> Thanks!
Comment 2 Kristian Rietveld 2007-10-01 18:56:48 UTC
(In reply to comment #1)
> Kris, i think this is simply asking for adding:
>   gtk_window_set_type_hint (tooltip_window, GDK_WINDOW_TYPE_HINT_TOOLTIP);
> to the new tooltip code.

This has been in the code since the beginning, even before the tooltips code was committed to trunk IIRC.  Note that for custom tooltip windows that the users create themselves, the type hint is not set automatically.

Rather, gail needs updating to set ATK_ROLE_TOOLTIP for the "gtk-tooltip" widget name in gail_window_real_initialize().  (The widget name used for the old tooltips was "gtk-tooltips").


Reassigning.
Comment 3 Joanmarie Diggs (IRC: joanie) 2007-10-01 19:10:16 UTC
Thanks Kristian for getting to the bottom of it!
Comment 4 Willie Walker 2007-10-02 14:33:29 UTC
Created attachment 96517 [details] [review]
Patch to add check for gtk-tooltip

This patch adds a check for gtk-tooltip ahead of the check for gtk-tooltips.  For compatibility purposes, I'd be hesitant to remove the gtk-tooltips check.  

But...more work needs to be done here because this patch doesn't solve the problem.  I now see the following message appear when I use this patch:

** Message: ATK_ROLE_TOOLTIP object found, but doesn't look like a tooltip.

This is due to the following code in gailwindow.c:gail_window_get_name:

          if (name == NULL &&
              accessible->role == ATK_ROLE_TOOL_TIP)
            {
              GtkWidget *child;

              child = gtk_bin_get_child (GTK_BIN (window));
	      /* could be some kind of egg notification bubble thingy? */
              if (!GTK_IS_LABEL (child)) 
	      { 
		  g_message ("ATK_ROLE_TOOLTIP object found, but doesn't look like a tooltip.");
		  return NULL;
	      }
              name = gtk_label_get_text (GTK_LABEL (child));
            }

So, I suspect the component hierarchy of tooltips has changed and GAIL needs to deal with that.
Comment 5 Willie Walker 2007-10-03 12:24:04 UTC
Created attachment 96566 [details] [review]
Patch that actually works.  :-)

Here's a new patch tested by Joanie and myself.  It seems to do the job nicely and Orca works again without modification.  Li, can you please take a look at this?  It would be great to get it fixed for GNOME 2.20.1.
Comment 6 Li Yuan 2007-10-08 07:37:08 UTC
Hi Will, just backed from a long holiday in China.

I think your second patch works well and doesn't get the warning comes with the first patch, right?
Comment 7 Willie Walker 2007-10-11 11:35:10 UTC
(In reply to comment #6)
> Hi Will, just backed from a long holiday in China.
> 
> I think your second patch works well and doesn't get the warning comes with the
> first patch, right?
> 

Thanks Li!  Yeah, the patch seems to fix the problem well and doesn't give the warning.  Can you submit this and do a release for GNOME 2.20.1, which is coming up soon (tarballs due October 15)?
Comment 8 Li Yuan 2007-10-12 06:11:40 UTC
Sure. Committed to both gnome2-20 branch and trunk.
Comment 9 Joanmarie Diggs (IRC: joanie) 2007-11-13 18:55:24 UTC
*** Bug 481809 has been marked as a duplicate of this bug. ***