GNOME Bugzilla – Bug 482295
[a11y] Tooltips are no longer exposed as tooltips to ATs
Last modified: 2007-11-13 18:55:24 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!
(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!
(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.
Thanks Kristian for getting to the bottom of it!
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.
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.
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?
(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)?
Sure. Committed to both gnome2-20 branch and trunk.
*** Bug 481809 has been marked as a duplicate of this bug. ***