GNOME Bugzilla – Bug 686005
Gtk*Accessible inaccessible
Last modified: 2012-10-15 20:27:53 UTC
It has been reported in other bugs (654630, 669441) how the Gtk*Accessible headers are not made public and one needs to directly inherit GtkAccessible in custom widgets. In doing so I have had to take the non-ideal path of pulling the code from GtkWidgetAccessible and trimming it to fit my needs. Unfortunately GtkWidgetAccessible.c contains extern _focus_widget (from gail.c I think) so whereas it can set up ATK_STATE_FOCUSED to the state_set I can't see how I can (though this might just be my lack of experience). Also the way gtk_widget_class_set_accessible_type is set up appears to be broken (see https://mail.gnome.org/archives/gtk-devel-list/2012-August/msg00054.html): (TestPlotPolar:4862): Gtk-CRITICAL **: gtk_widget_class_set_accessible_type: assertion `g_type_is_a (type, widget_class->priv->accessible_type)' failed (TestPlotPolar:4862): Gtk-CRITICAL **: gtk_widget_class_set_accessible_type: assertion `g_type_is_a (type, widget_class->priv->accessible_type)' failed [rant] I can understand the felt need to protect code from sloppy developers that seems to be the way in which gtk+3 has gone but in the case of accessibility protect from whom (not to mention if I can't use it at all I may as well protect it by hole punching my hard drive)? Apart from a few major projects no-one programs with ATK calls in GTK. The novice GTK programmer has no awareness of ATK. Tutorials on the GTK website do not mention it at all. The ATK site is also not very educational. There are the basics such as coding guidelines, but when it comes to mention implementing accessibility for custom widgets the direction is very thin, seemingly assuming that the inquirer is an advanced programmer and can figure it out on their own. I guess it's good to see accessibility merging into gtk but I can see the danger that if it is marginalised then eventually people will give up on it and it will be ditched. True your average developer doesn't care, but pretty much everyone has a blind grandma, etc. and so has the capacity to care if the awareness is raised. [/rant] Please, Please, Please make the gtk*accessible headers public or at least start with GtkWidgetAccessible (and maybe chain up to GtkDrawingAreaAccessible from which a lot of custom widgets would be based). Even if it is not completely ready, better to have something than nothing.
Which exact version of Gtk+ does this refer to?
I thought I had it listed on the report as 3.1. It has been the case with every version since gtk_widget_class_set_accessible_type was introduced (I think technically this was 3.1 though the documentation says 3.2).
I see. We normally don't set the Version to where it was introduced, but to the Version it happened with. That's why I was afraid that you run an ancient 3.1 development version.
I'm not running 3.1 but 3.4. I put 3.1 as that was where I thought the issue was introduced from and wanted to cover all my bases with the report.
*** This bug has been marked as a duplicate of bug 685827 ***