GNOME Bugzilla – Bug 671404
Orca doesn't present some elements at user menu
Last modified: 2012-03-15 18:10:01 UTC
STEPS TO REPRODUCE 0. Precondition: Orca + GNOME Shell running 1. Ctrl+Alt+Tab select Top Bar, navigate to the user menu (top right) 2. Start to navigate on the menu (down and up arrows) EXPECTED OUTCOME: All the elements are exposed ACTUAL OUTCOME Some missing elements: a) IMStatus combobox: doesn't present combobox role or selected item b) If you press the enter on the combo box a popup menu appears, and you can select items with keys, orca doesn't present it c) Suspend/Power off label are not present
Created attachment 209022 [details] [review] userMenu support for IMStatus combobox and suspend/power-off label This patch fixes all the issues explained at comment 0. One could wonder why I add a new label_actor relation on IMStatusItem._init, as I do the same on some of his siblings (PopupMenuItem._init, PopupSwitchMenuItem._init, etc), and that would make sense to do that just onece, on his subclass, PopupBaseMenuItem._item. But that could be only possible if I assume that PopupBaseMenuItem will always have a label, something that it is not always true. ie: PopupSeparatorMenuItem and PopupSliderMenuItem
Comment on attachment 209022 [details] [review] userMenu support for IMStatus combobox and suspend/power-off label >+ getMenuItem: function(position) { >+ return this._getMenuItems()[position]; >+ }, It looks like really all you need is to add getActiveItem() to PopupComboMenu to match setActiveItem(). >+ checkAccessibleLabel: function() { >+ let activeItem = this._menu.getMenuItem (this._activeItemPos); nitpick: no space before "(" there.
Created attachment 209514 [details] [review] userMenu support for IMStatus combobox and suspend/power-off label (In reply to comment #2) > (From update of attachment 209022 [details] [review]) > >+ getMenuItem: function(position) { > >+ return this._getMenuItems()[position]; > >+ }, > > It looks like really all you need is to add getActiveItem() to PopupComboMenu > to match setActiveItem(). Well I tried to match with PopupMenuBase.firstMenuItem, to have a more general method (get any item, instead of just first item). In fact it would be easy to remove firstMenuItem, and call getMenuItem(0) Anyway this patch removes PopupMenuBase.getMenuItem and adds PopupComboMenu.getActiveItem() as suggested. > >+ checkAccessibleLabel: function() { > >+ let activeItem = this._menu.getMenuItem (this._activeItemPos); > > nitpick: no space before "(" there. Fixed. This updated patch also adds: const Atk = imports.gi.Atk So this could be applied independently of patch at bug 667432 (but we need to take that into account as patch at bug 667432 also adds that line).
Comment on attachment 209514 [details] [review] userMenu support for IMStatus combobox and suspend/power-off label looks right
(In reply to comment #4) > (From update of attachment 209514 [details] [review]) > looks right Committed a slightly changed patch, as I removed this line: const Atk = imports.gi.Atk; That was already added when I closed bug 667432