GNOME Bugzilla – Bug 617629
CellRendererPixbuf not accessible to the blind
Last modified: 2018-04-15 00:11:57 UTC
There is no obvious way to assign a description to the accessible object associated with the image rendered by this class. This results in images that are spoken as "image". The information contained in an image is often very important. An example is in gnome-app-install, where the "popularity" TreeViewColumn is rendered with CellRendererPixbuf using 0-5 stars. I can find no way to access the accessible object on the widget rendered by this class.
I've looked at the code in gailimagecell.c, gtkcellrendererpixbuf.c, and related code. The problem is that there isn't actually any widget for TreeView cells, just calls to render them. The accessibility code in modules/other/gail, on the other hand, assumes the TreeModel is accurate, and generates responses to the accessiblity queries based on the model. There is typically no pixbuf description in the model, just the pixbuf. One possible fix would be to add a "description" member to pixbuf, and to add code to gailimagecell.c in gail_image_cell_update_cache to initialize the description field from the cellrenderer's pixbuf. With such a fix, programmers would only need to add one line of code to make their icons in treeviews have text descriptions. Another solution, which I like less, is to add a pixbuf image description column to the treeview model and adding an "image_description" property on the GtkCellRendererPixbuf to indicate the column describing the image. This approach is how text is associated with pixbufs in the GtkIconView class, and this is how other properties of cells are communicated in most other cases. However, this would require that an application developer do quite a bit more work to have accessible icons. In general, I feel it is important to minimize his required effort to support accessibility.
I confirm bill wroted problem for example the gnome-app-install application. Attila
Created attachment 160454 [details] [review] This is the quilt patch that I added to the Ubuntu package to get it working. This is the quilt patch I added to the Ubuntu gtk+2.0-2.20.0 source package. I've also patched pygtk, and gnome-app-install, and now the blind can finally hear how many stars are displayed! This effects several major Gnome-based applications. Next, I'll probably patch synaptic, as it has non-accessible package status icons. It should only take one new line for each icon. This patch adds a "description" property to pixbufs. It makes it trivial for programmers to assign accessible descriptions to pixbufs drawn with gtkCellRenderPixbuf. Bill
Created attachment 162233 [details] [review] Updated patch, based on user-testing This patch has now been undergoing testing in the Vinux community for a few weeks. With it, I was able to make gnome-app-install read the number of stars instead of saying "icon" with a one-line change. I also upgraded Synpatic to properly read the status of a package, rather than just saying "icon", making Synpatic usable by the blind for the first time. Even in C, it was only a six line change to announce both the package status and whether it was supported by Ubuntu. Bill
After a quick email interchange I took a look to this bug. I think that the patch is ok, the main issue will pick each application to use the new description property. Not sure if it would also worths to add a public _set_property method. But I think that it is assigned to the wrong component. Although the problem is detected reading GtkTreeView, take into account that this is because the missing property on gdk-pixbuf, and the missing support on gail for this new property. So, I would do that: * Split the patch in two, one with gdk-pixbuf changes, one with gail changes. * Let gdk-pixbuf patch here, and reassign bug to gdk-pixbuf component. * Open a new bug and upload gail patch. Set a dependency between both. If you think that splitting the patch is a overkill, I would at least reassign this bug to gdk-pixbuf component.
Changing "product" to gdk-pixbuf, and "component" to gail. Sorry I don't understand these fields properly! I've patched both synaptic and gnome-app-install to use the new property. It's very easy, so I suspect that vision impaired users will submit patches to authors of the most important apps.
(In reply to comment #6) > Changing "product" to gdk-pixbuf, and "component" to gail. Sorry I don't > understand these fields properly! Just trying to explain that further (not picky behaviour intended). There isn't any gail component on gdk-pixbuf. gail is a component of the product gtk. You probably were able to select gail because you were still on gtk product (note that right now this is on general component). But now, at least, gdk-pixbuf changes are applied to the correct product. > I've patched both synaptic and gnome-app-install to use the new property. It's > very easy, so I suspect that vision impaired users will submit patches to > authors of the most important apps. Yeah, sure. What I tried to say is that there would be hypothetically a lot of applications to made this move.
Created attachment 179140 [details] [review] Split out gail portions of patch. This is a new version of the previous patch which can be directly applied to the git gdk-pixbuf repository. It was generated with 'git diff HEAD^'. It was applied to commit 301b842733910b070d48bedaaa0f4db963df68fe. The gail portion of the previous patch will be filed in a new bug report.
I don't think it is the right approach to attach a description to the pixbuf. A pixbuf is just a bunch of image data.
Moving this to gail
Moved to gail? You do realize, Matthias, that adding an accessible description to pixbuf can not be done in gail, right? You said, "I don't thing it is the right approach to attach at description to the pixbuf." This is the most commonly used image data structure in GTK+, even to the extent that cell_pixbuf_renderer requires it, and provides no alternative method for providing an accessible description. Are you really saying that an image, which is typically many killobytes, can't afford an accessible description? This issues has been in limbo for two years with no action. Shame on you.
(In reply to comment #11) > Shame on you. Please stop this and read https://live.gnome.org/CodeOfConduct before adding further comments in GNOME Bugzilla.
(In reply to comment #11) > Moved to gail? You do realize, Matthias, that adding an accessible description > to pixbuf can not be done in gail, right? FWIW, gail is now totally integrated on gtk+. In fact, in some sense we could say that gail is dead, and that moving to this component is just saying that this is an accessibility bug for gtk+. In that sense, several of the last improvements on the accessible support for gtktreeview are about gailtreeview accessing private data from gtktreeview. So now there are other options to solve this issue. > This issues has been in limbo for two years with no action. Shame on you. I wouldn't just blame Matthias here for this two year inactivity. Module maintainer said that it was not the proper approach, and what was patch author reaction: do nothing. No proposed alternatives, no questions about alternatives.
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla. If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab: https://gitlab.gnome.org/GNOME/gtk/issues/new