GNOME Bugzilla – Bug 667376
Orca doesn't present Panel items names
Last modified: 2012-01-27 11:37:14 UTC
STEPS TO REPRODUCE 1. Activate Screen Reader (Universal Access Settings) 2. Give the focus to the panel (Ctrl+Alt+Tab) 3. Navigate on the items EXPECTED OUTCOME Orca present a name/role combination for each item ACTUAL OUTCOME Only Activities do that (and with a wrong role, but this is a different bug)
Created attachment 204706 [details] [review] Sets a name for each item This patchs sets a proper name, but in the case of the PanelMenu.Button, it creates a St.Label just to be used as the accessible label. This is because there isn't any St.Widget.set_accessible_name (text). Anyway, having a label_actor to expose the name is coherent with some items. In the case of the date, I use the internal date label as the label_actor. Note that the role are still fuzzy, but this is a different bug.
(In reply to comment #0) > STEPS TO REPRODUCE > > 1. Activate Screen Reader (Universal Access Settings) > 2. Give the focus to the panel (Ctrl+Alt+Tab) > 3. Navigate on the items In the end I decided that this and bug 667369 should be the same bug. So: 4. For each menu, open it and navigate on the subitems
*** Bug 667369 has been marked as a duplicate of this bug. ***
Created attachment 204769 [details] [review] Sets name for several items on the top panel This includes each icon on the panel, menu subitems, etc
Review of attachment 204769 [details] [review]: Generally looks good to me, just a few things ::: js/ui/panel.js @@ +536,2 @@ this._label.setText(targetApp.get_name()); + this.setName(targetApp.get_name()); This seems to destroy and create labels on every focus change - not necessarily a big problem but maybe not necessary? ::: js/ui/panelMenu.js @@ +97,3 @@ Extends: ButtonBox, + _init: function(menuAlignment, textName, dontCreateMenu) { you have textName here and nameText down below. (I like nameText better as a name) @@ +119,3 @@ + // purposes in the future. + this.label = new St.Label({ text: text }); + this.actor.label_actor = this.label; Couldn't you reuse the old this.label if it existed?
Created attachment 206209 [details] [review] Setting a name/label_actor for several items on the panel Updated patch. Using nameText always. Now the label is reused if existed. This should fix the first issue about creating label on every application focus change.
Created attachment 206210 [details] [review] Notify accessible name change While updating previous patch I realized that StLabelAccessible was not notifying a accessible-name change when the text of the label changed.
Review of attachment 206209 [details] [review]: Looks good
Review of attachment 206210 [details] [review]: One indentation problem, otherwise OK to commit ::: src/st/st-label.c @@ +485,3 @@ +label_text_notify_cb (StLabel *label, + GParamSpec *pspec, + AtkObject *accessible) parameter aligment