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 325809 - getAccessibleAtPoint for tables does not seem to take column headers into account
getAccessibleAtPoint for tables does not seem to take column headers into acc...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
: 344000 564943 (view as bug list)
Depends on: 415705
Blocks: 344159 415812 419135 519096 519313
 
 
Reported: 2006-01-04 22:53 UTC by Willie Walker
Modified: 2009-02-26 02:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case (15.03 KB, text/x-python)
2006-01-04 23:04 UTC, Willie Walker
  Details
New test case that does ref/unref (15.14 KB, text/x-python)
2007-04-18 13:59 UTC, Willie Walker
  Details
patch (1.51 KB, patch)
2009-02-19 07:53 UTC, Li Yuan
committed Details | Review

Description Willie Walker 2006-01-04 22:53:11 UTC
When calling getAccessibleAtPoint on a table with column headers, all results are shifted down by the column header height.  The attached standalone python test app provides a means for demonstrating this on the gtk-demo tables.
Comment 1 Willie Walker 2006-01-04 23:02:37 UTC
Steps to reproduce:

1) Run the attached standalone application in an xterm
2) Run gtk-demo, making sure GTK_MODULES=:gail:atk-bridge: prior to running
3) Open the "Editable Cells" or "List Store" or "Tree Store" demos under "Tree View"
4) Make sure the table in the chosen demo has focus
5) Position the mouse pointer over a cell and press F11, watching the output in the xterm where you are running the standalone application

You will find that the accessible returned is actually the cell underneath the cell with the pointer.  This is even the case when the pointer is over a column header.  It's as though the column header doesn't exist.
Comment 2 Willie Walker 2006-01-04 23:04:37 UTC
Created attachment 56791 [details]
Test case
Comment 3 Calum Benson 2006-04-26 17:05:48 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 4 Elijah Newren 2006-06-06 17:24:16 UTC
*** Bug 344000 has been marked as a duplicate of this bug. ***
Comment 5 Peter Parente 2006-06-06 20:13:26 UTC
Copying addition info from Bug #344000

"Also, the behavior of getAccessibleAtPoint is inconsistent once the table has
been scrolled and resized. Sometimes, the reported cell is incorrect in both
row and column after the scroll."
Comment 6 Li Yuan 2007-04-16 08:15:36 UTC
Hi Will, as I tried, the script doesn't output anything when I pressed F11. Is there any step I missed?

I just ran "python bug_325809.py"
Comment 7 Rich Burridge 2007-04-16 14:32:45 UTC
On a Sun keyboard, the F11 key generates the "SunF36" not "F11".
Similar for F12. So the the notifyKeystroke() routine in the
script needs to be adjusted to something like:

def notifyKeystroke(event):
    if event.event_string == "F12" or event.event_string == "SunF37":
        shutdownAndExit()
    elif event.event_string == "F11" or event.event_string == "SunF36":
        ...
Comment 8 Yi Jin 2007-04-18 08:20:08 UTC
Hi Rich, I have tried the script and there is still a problem.

notifyKeystroke(event) never returns and prints nothing. It seems blocked when calling :component = focusedObj.queryInterface(\
                "IDL:Accessibility/Component:1.0")

Is there anything I have ever missed ? Thx
Comment 9 Willie Walker 2007-04-18 13:59:50 UTC
Created attachment 86562 [details]
New test case that does ref/unref

The old test case neglected to do a ref/unref on the accessible it was watching.  Try this new one - I just tested it and it works on Ubuntu Feisty.  I also added some SunF3? references as well.  Thanks!
Comment 10 Yi Jin 2007-04-19 06:00:17 UTC
Hi, Willie, the test case runs very well, thx!
Comment 11 Yi Jin 2007-04-20 07:41:06 UTC
By checking codes of gail and gtk, we consider this may be a gtk's bug.

In gailtreeview.c, function gail_tree_view_ref_accessible_at_point() computes the position (x,y) of whole treeview's widget, and passes x and y directly to gtk_tree_view_get_path_at_pos().

However, gtk_tree_view_get_path_at_pos() assume the position is based on priv->bin_window which does not include header_window. For we find gtk_tree_view_button_press() has the same code for finding the clicked node, which runs well.

By checking the GtkTreeView's API, we find it impossible to decide header's actual height. So Gail can't minus header's height by itself. 
Comment 12 Willie Walker 2007-10-11 12:34:39 UTC
(In reply to comment #11)
> By checking codes of gail and gtk, we consider this may be a gtk's bug.
> 
> In gailtreeview.c, function gail_tree_view_ref_accessible_at_point() computes
> the position (x,y) of whole treeview's widget, and passes x and y directly to
> gtk_tree_view_get_path_at_pos().
> 
> However, gtk_tree_view_get_path_at_pos() assume the position is based on
> priv->bin_window which does not include header_window. For we find
> gtk_tree_view_button_press() has the same code for finding the clicked node,
> which runs well.
> 
> By checking the GtkTreeView's API, we find it impossible to decide header's
> actual height. So Gail can't minus header's height by itself. 

Thanks Yi!  Do you have a recommended way of fixing this?
Comment 13 Willie Walker 2008-12-08 15:31:17 UTC
Just a gentle ping on this one.  :-)
Comment 14 Li Yuan 2008-12-09 07:43:57 UTC
Matthias, from comment #11, we need gtk_tree_view_get_path_at_pos to count header window or an API to get the header window's height.
Comment 15 Li Yuan 2008-12-18 02:35:04 UTC
*** Bug 564943 has been marked as a duplicate of this bug. ***
Comment 16 Li Yuan 2009-02-19 07:53:25 UTC
Created attachment 129038 [details] [review]
patch

Actually we have such function :)