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 692258 - missing accessibility: Implement GtkListBoxRowAccessible, set its state to SELECTED when appropriate
missing accessibility: Implement GtkListBoxRowAccessible, set its state to SE...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
unspecified
Other Linux
: High blocker
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-01-22 06:46 UTC by Jeremy Bicha
Modified: 2013-09-22 00:51 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
event listener (299 bytes, text/plain)
2013-01-28 14:17 UTC, Joanmarie Diggs (IRC: joanie)
  Details
A minimal accessible implementation (10.02 KB, patch)
2013-01-29 05:26 UTC, Matthias Clasen
committed Details | Review
modified event listener (176 bytes, text/x-python)
2013-02-04 23:17 UTC, Joanmarie Diggs (IRC: joanie)
  Details
The modified modified listener (471 bytes, text/plain)
2013-02-05 00:04 UTC, Joanmarie Diggs (IRC: joanie)
  Details

Description Jeremy Bicha 2013-01-22 06:46:41 UTC
EggListBox is missing accessibility properties.

This means that every one of the new panels in Settings 3.7 (Notifications, Privacy, Search, & Sharing) currently has significant sections which are completely silent when the Orca screen reader is turned on.
Comment 1 Matthias Clasen 2013-01-23 00:47:24 UTC
Not sure whats missing here. EggListBox inherits the GtkContainer accessible implementation, which is what GtkBox uses as well.

Sniff shows the children of EggListBoxes just fine.
Comment 2 Matthias Clasen 2013-01-23 01:26:03 UTC
Joanie, any idea ?
Comment 3 Matthias Clasen 2013-01-23 11:09:59 UTC
Tentatively moving to orca
Comment 4 Matthias Clasen 2013-01-23 11:13:55 UTC
Marking as 3.8 blocker.

Joanie, could you do some 'a11y assessment' of EggListBox with some recommendations (like you started on irc), and move the bug back ?

Thanks!
Comment 5 Joanmarie Diggs (IRC: joanie) 2013-01-28 14:17:54 UTC
Created attachment 234618 [details]
event listener
Comment 6 Joanmarie Diggs (IRC: joanie) 2013-01-28 14:23:10 UTC
Steps to reproduce:

1. Launch the attached event listener in a terminal
2. Arrow around within the Privacy panel of gnome-control-center

Expected results: Accessible events would be spewed out in the terminal.
Actual results: No accessible events are shown in the terminal.

Orca's not presenting anything because it has no idea anything has changed.

And note that Orca is not expecting all of the events shown in the listener. Those are just the usual suspects taking into account implementor variations.

(In reply to comment #4)
> Marking as 3.8 blocker.
> 
> Joanie, could you do some 'a11y assessment' of EggListBox with some
> recommendations (like you started on irc), and move the bug back ?
> 
> Thanks!

Done. Thanks for the heads up on this one!
Comment 7 Matthias Clasen 2013-01-29 05:26:20 UTC
Created attachment 234697 [details] [review]
A minimal accessible implementation

To inform ATs about what is going on, implement AtkSelection,
and also emit ::active-descendant-changed. This seems enough
to make orca read 'filler' for each row (unless the row happens
to be just a label, in which case, it reads the label).
Comment 8 Matthias Clasen 2013-01-29 05:29:06 UTC
A more thorough implementation would also add accessible objects for each row, and have them implement AtkAction, but that runs into unsolvable issues with get_parent (see the special-case hackery that is happening for GtkNotebookPageAccessible in gtk).

Not sure what can be done about the issue that orca just reads 'filler' in the common case that the row is a GtkBox with content. Maybe apps just need to set accessible descriptions on their rows ?
Comment 9 Alexander Larsson 2013-01-29 08:32:14 UTC
Review of attachment 234697 [details] [review]:

Looks good as a start.

::: egg-list-box-accessible.c
@@ +129,3 @@
+
+  children = gtk_container_get_children (GTK_CONTAINER (box));
+  child = g_list_nth_data (children, idx);

Ugh, nth_child => easy to get O(n^2) algos. I hope nothing is iterating using this...
Comment 10 Alexander Larsson 2013-01-29 08:34:51 UTC
Its really a generic issue that there is no object representing the Nth row that we can set state on. This hurts us also in the themeing case, since state such as SELECTED can only be transiently set during the draw() call when drawing the row, which means its impossible for it to affect e.g. layout (border widths, etc).

I'm hoping actors would solve this...
Comment 11 Matthias Clasen 2013-01-29 10:38:23 UTC
(In reply to comment #10)
> Its really a generic issue that there is no object representing the Nth row
> that we can set state on. This hurts us also in the themeing case, since state
> such as SELECTED can only be transiently set during the draw() call when
> drawing the row, which means its impossible for it to affect e.g. layout
> (border widths, etc).
> 
> I'm hoping actors would solve this...

One alternative I had considered is a viewport-like approach, where there parent inserts a special-purpose container when a child is added; effectively turning your childinfo into a widget. That has some of its of its problems, but it would help with this.
Comment 12 Alexander Larsson 2013-01-29 15:27:58 UTC
Thats kinda what actors are supposed to help with though, are they not?
Comment 13 Matthias Clasen 2013-01-30 10:52:15 UTC
2 questions for which I'd like some input from the a11y side:

- is this good enough, or do we need to go for per-row a11y objects that have atkaction and proper state ? doing so will break get_parent to some degree (or require some horrible hack in side gtk to make it work)

- can we do something automatically to get more meaningful text than 'filler' for the common row that is a box with some label deeper inside ? What works today is to set a labelled-by relation, but thats a lot of manual work...
Comment 14 Matthias Clasen 2013-01-31 17:18:16 UTC
Comment on attachment 234697 [details] [review]
A minimal accessible implementation

I've pushed the minimal implementation; leaving this bug open
to deal with the followup.
Attachment 234697 [details] pushed as 7c64979 - A minimal accessible implementation
Comment 15 Matthias Clasen 2013-02-03 16:27:01 UTC
comments still very much appreciated here. if the current a11y implementation is as good as it gets, we have to start adding labeled-by relations to all users
Comment 16 Joanmarie Diggs (IRC: joanie) 2013-02-03 16:52:09 UTC
(In reply to comment #15)
> comments still very much appreciated here.

Funny you mention it, as we "speak" I am sitting here trying to get this working in my jhbuild environment.
Comment 17 Joanmarie Diggs (IRC: joanie) 2013-02-03 17:51:35 UTC
Okay, I got it working, in the sense of I'm getting an event.

According to these docs [1], 

   The "active-descendant-changed" signal is emitted by an object
   which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus
   object in the object changes. For instance, a table will emit the
   signal when the cell in the table which has focus changes.

But I'm not seeing that state on any of the panels.

Also, any chance you could give the egg-list-box the role of ATK_ROLE_LIST_BOX [2]?

Having said that, I probably can hack around this in Orca.



[1] http://developer.gnome.org/atk/unstable/AtkObject.html#AtkObject-active-descendant-changed
[2] http://developer.gnome.org/atk/unstable/AtkObject.html#AtkRole
Comment 18 Joanmarie Diggs (IRC: joanie) 2013-02-03 17:55:42 UTC
(In reply to comment #17)

> Also, any chance you could give the egg-list-box the role of ATK_ROLE_LIST_BOX
> [2]?

And if so, mind also giving the children the role of ATK_ROLE_LIST_ITEM?
Comment 19 Matthias Clasen 2013-02-04 11:30:55 UTC
I've now added ATK_ROLE_LIST_BOX and ATK_STATE_MANAGES_DESCENDANTS.

> And if so, mind also giving the children the role of ATK_ROLE_LIST_ITEM?

This, I can't do unless we add fake a11y children. Remember, right now the children are just labels, boxes, checkboxes, whatever you want to put there. They already have their own roles.
Comment 20 Joanmarie Diggs (IRC: joanie) 2013-02-04 12:16:46 UTC
(In reply to comment #19)
> I've now added ATK_ROLE_LIST_BOX and ATK_STATE_MANAGES_DESCENDANTS.
> 
> > And if so, mind also giving the children the role of ATK_ROLE_LIST_ITEM?
> 
> This, I can't do unless we add fake a11y children. Remember, right now the
> children are just labels, boxes, checkboxes, whatever you want to put there.
> They already have their own roles.

Ugh. On the one hand, fake a11y children doesn't sound good. And were I you, I wouldn't want to implement them. On the other hand, from the Assistive Technology / consumer point of view, a bunch of fillers and panels does not a meaningful a11y hierarchy make.

Piñeiro, any thoughts on this one?
Comment 21 Matthias Clasen 2013-02-04 18:54:09 UTC
fake children would not be so bad, if they wouldn't break get_parent
Comment 22 Joanmarie Diggs (IRC: joanie) 2013-02-04 22:30:05 UTC
Okay, with very minimal hackery in Orca, I've got the items in the opening report presented much better than they were before.

http://git.gnome.org/browse/orca/commit/?id=ba9a2d5202a38970ca076b3e30ec2b6f12046c4e

Now to work out a nit around an accessible event. Not sure who will need to hack around that one yet.
Comment 23 Joanmarie Diggs (IRC: joanie) 2013-02-04 22:52:36 UTC
It was easy enough for me to hack around the extra/poorly-timed focus: event in Orca, so I did.

http://git.gnome.org/browse/orca/commit/?id=d7fb31a686e4cdc82333ff8e247f0b06393a64d2

I think I just found a case where events go missing, however. Looking into that next as I'll need that handled on your end.
Comment 24 Joanmarie Diggs (IRC: joanie) 2013-02-04 23:17:24 UTC
Created attachment 235179 [details]
modified event listener

This listener just dumps out the object:active-descendant-changed events. Seems that we are always getting two events. Why?
Comment 25 Joanmarie Diggs (IRC: joanie) 2013-02-05 00:04:32 UTC
Created attachment 235180 [details]
The modified modified listener

This listener illustrates the problem I began looking into when I discovered the duplicate events and should illustrate both problems.

Problem 1: Why are there duplicate events?

Problem 2: Items which started out not-showing, don't update state showing when scrolled.

Here's my output from Notifications:

========================================================
$ ./egg.py 

    All: [icon | ][label | Archive Manager][label | On]
Showing: [icon | ][label | Archive Manager][label | On]

    All: [icon | ][label | Clocks][label | On]
Showing: [icon | ][label | Clocks][label | On]

    All: [icon | ][label | Clocks][label | On]
Showing: [icon | ][label | Clocks][label | On]

    All: [icon | ][label | Empathy][label | On]
Showing: [icon | ][label | Empathy][label | On]

    All: [icon | ][label | Empathy][label | On]
Showing: [icon | ][label | Empathy][label | On]

    All: [icon | ][label | Evolution][label | On]
Showing: [icon | ][label | Evolution][label | On]

    All: [icon | ][label | Evolution][label | On]
Showing: [icon | ][label | Evolution][label | On]

    All: [icon | ][label | Files][label | On]
Showing: [icon | ][label | Files][label | On]

    All: [icon | ][label | Files][label | On]
Showing: [icon | ][label | Files][label | On]

    All: [icon | ][label | Network][label | On]
Showing: 

    All: [icon | ][label | Network][label | On]
Showing: 

    All: [icon | ][label | Online Accounts][label | On]
Showing: 

    All: [icon | ][label | Online Accounts][label | On]
Showing: 

    All: [icon | ][label | Software][label | On]
Showing: 

    All: [icon | ][label | Software][label | On]
Showing: 

    All: [icon | ][label | Software Update][label | On]
Showing: 

    All: [icon | ][label | Software Update][label | On]
Showing: 
========================================================

I originally thought an event was "going missing". It's not. I'm grabbing the text from objects which claim to be showing and presenting that now in Orca. Because the objects are not updating their SHOWING state, Orca's not presenting anything for items which had been scrolled off the screen.

I can hack around this in Orca if need be, but this feels just a plain ol' a11y bug to me.

Matthias: The ball is officially in your court. :)

(And thank you very much for all your work on this! We'll have it all sorted well in time for 3.8.)
Comment 26 Matthias Clasen 2013-02-05 12:24:27 UTC
I've fixed the double emission
Comment 27 Matthias Clasen 2013-02-05 12:33:30 UTC
Not sure whats going on with showing - that needs more debugging. Are parts of the a11y stack caching state sets and rely on ::state-changed signals to refresh the cache ? I could easily see gail forgetting to emit one of those.
Comment 28 Joanmarie Diggs (IRC: joanie) 2013-02-05 17:18:54 UTC
Hey guys. We started chatting about this in IRC, but I didn't quite grasp what the verdict is.

I can hack around this easily enough in Orca. And the showing/visible a11y situation is a mess. So I'm really tempted to do that. Any reasons why I should not?
Comment 29 Matthias Clasen 2013-02-05 19:48:34 UTC
I think we decided that the egglistboxaccessible should filter out the accessibles of filtered-out widgets.

And Benjamin said that he thinks the SHOWING breakage is just an instance of general SHOWING breakage. For that more general breakage, we would have to reduce caching of accessible state if the accessibles are inside a scrolled window.
Comment 30 Joanmarie Diggs (IRC: joanie) 2013-02-06 14:52:04 UTC
Thanks Matthias. Due to sleep-deprivation-related cloudimindedness on my part, it still isn't clear to me if your response constitutes a reason why I should not deal with this in Orca. But I can deal with it safely in Orca, so that is what I have done: http://git.gnome.org/browse/orca/commit/?id=5a6ce1444a53dfca59274eab291f29a1588fb60f

So at this point, egg-list-box is no longer "missing accessibility" thanks to Matthias. Orca is now presenting the information for the panels mentioned in the opening report. So this "blocker" is now fixed. Shall we close this bug out (or at least remove it from the "blocker" list?
Comment 31 Matthias Clasen 2013-02-07 01:51:18 UTC
Yes, lets close it. Thanks for your help
Comment 32 Jeremy Bicha 2013-02-14 03:08:21 UTC
I still haven't managed to get orca to read the list boxes in Settings 3.7.5. I even rebuilt my system orca with a fresh tarball from master just now. All I hear is "Panel".
Comment 33 Joanmarie Diggs (IRC: joanie) 2013-02-14 03:12:39 UTC
And you have the egg-list-box changes Matthias made? (my guess is you don't because after Matthias made his changes to egg-list-box and before I did any changes in Orca, Orca was saying "filler" instead of "panel")
Comment 34 Jeremy Bicha 2013-02-15 16:42:59 UTC
Pushed to g-c-c after IRC approval
Comment 35 Matthias Clasen 2013-07-01 11:44:01 UTC
Moving this to gtk and reopening, since it has a lot of useful discussion.
Left to do here:

Implement GtkListBoxRowAccessible, set its state to SELECTED when appropriate