GNOME Bugzilla – Bug 72249
GAIL should create LABELLED_BY relation for mnemonic widget
Last modified: 2004-12-22 21:47:04 UTC
GAIL creates a ATK_RELATION_LABEL_FOR relation for a label which has a mnemonic widget. It should also create a ATK_RELATION_LABELLED_BY relation for the mnemonic widget
The problem with creating the LABELLED_BY relation when the LABEL_FOR relation is created is that atk_object_ref_relation_set may already have been called for the AtkObject for the mnemonic widget and the relation set will not contain the LABELLED_BY relation. It is not possible for GAIL to determine when a mnemonic widget is set for a label by using emission hooks as the nbotify signal does not permit emission hook
We should add a GTK function: GList* gtk_widget_get_mnemonic_labels(GtkWidget *w); Should be possible to implement sanely on the GTK level. This would then allow us to avoid keeping labelled-by properties updated manually.
Owen, Would you accept a patch to implement Havoc's suggestion?
This is potentially a serious bug since it prevents heuristics that search for "LABELLED_BY" relations. We need to address this issue soon, so we can fix it in 2.3 or even GNOME 2.2.1.
Created attachment 13745 [details] [review] Proposed patch
The proposed patch assumes that a patch for bug 103456, or similar, is applied.
Updating status_whiteboard field to reflect A11Y team's assessment of accessibility impact.
*** Bug 111859 has been marked as a duplicate of this bug. ***
I think that I can something about this in GAIL even if we do not get the fix for bug #103456. Given a widget, get its parent. If the previous child of the parent is a label and its mnemonic widget is the current widget create the LABELLED_BY relation. Will this cover most of the cases we are interested in?
Created attachment 16172 [details] [review] Proposed patch to create LABELLED_BY relation
Created attachment 16391 [details] gdb output for nautilus with last patch applied
With last patch (id=16172) I get a segmentation fault when I try to start nautilus. Atached the gdb results.
Created attachment 16395 [details] [review] Updated patch
Sorry about the bad patch. Can you try the updated one.
The new patch works fine.
I have committed the last patch to CVS HEAD. I will rework it when bug #103456 is fixed.