Re: Okay, how do I make a GtkTreeView accessible?
- From: Piñeiro <apinheiro igalia com>
- To: gnome-accessibility-list gnome org
- Subject: Re: Okay, how do I make a GtkTreeView accessible?
- Date: Wed, 16 Jan 2013 12:38:29 +0100
On 01/15/2013 09:46 PM, Dylan McCall wrote:
>
> This is basically a question I asked on StackOverflow:
> http://stackoverflow.com/questions/14223296. It's probably better
> answered on this mailing list, so here I am!
Taking into account that most of your questions are related to a
specific accessibility implementation for GTK, probably the proper
mailing list is gtk-devel list [1]. Anyway, just adding some comments.
> What I would like to do is to poke at the accessibility objects that
> describe this table in order to make them a little more helpful. Using
> Accerciser, I can see that these exist, but they all seem to be
> implemented with private, undocumented classes (like
> GtkTreeViewAccessible),
Recently most of the gtk accessible headers were made public in order to
be able to extend them [2], anyway ...
> and they don't look terribly extensible,
... it is true that they don't expose too much API. Anyway, not sure if
this is related to the treeview, as your problems are more about custom
cell renderers.
> but
> I'm hoping I'm wrong. Knowing that the treeview's accessible object is
> an AtkTable at some level,
Yes treeview accessible object implements AtkTable.
> I did the following to set an accessible
> description for the image cell in the Backup row:
>
> access = self.treeview_update.get_accessible()
> cell_access = access.ref_at(0,0)
> cell_access.set_image_description("Requires system restart")
>
> (Orca still says "Image" after speaking the description, but I'll
> assume it knows what it's doing).
I guess that "Image" is the role of that cell. In short, when an UI
object get focus, the most relevant information are:
* Name: that answers "what is the name of the object focused?", in
that case, I guess that it is using the image description as name
* Role: that answers "what kind of object is the object focused?",
there are several roles, button, images, etc [3]
* State: that answers "what is the state of this object?", for a
checkbutton, that would answer if the button is checked or not [4]
> However, that code isn't very nice. When I call access.ref_at, I'm
> making particular assumptions about how GTK is mapping cell positions
> to rows and columns in the ATK object. I'm also limited to calling
> that when I first populate the tree, and I'm not sure if that is
> particularly sane.
Probably not.
> So there's my problem: I would like to add accessible descriptions for
> my tree view cells in a nice way that won't break unexpectedly. How
> can I do that? Can you point me to any example code?
As I said, that seems a really specific gtk question. I really think
that asking at gtk-devel, or poking Benjamin Otte (aka Company on IRC)
would be better.
Best regards
[1] https://mail.gnome.org/mailman/listinfo/gtk-devel-list
[2] http://developer.gnome.org/atk/stable/AtkObject.html#AtkRole
[3] http://developer.gnome.org/atk/stable/atk-AtkState.html#AtkStateType
--
Alejandro Piñeiro Iglesias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]