GNOME Bugzilla – Bug 569346
No speech for image-only ARIA buttons and ARIA menu items
Last modified: 2009-01-28 17:45:32 UTC
There's some stuff in Dojo's implementation that manifests itself as an Orca bug in two different ways. I'm grouping them here because I believe they are related to the same problem and the fix for both is intertwined. Problem #1: non-visual text is not spoken for image only buttons 1) Go to http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_Button.html 2) Tab to the "+" button in the "Buttons with no text label" section. 3) Orca will speak/braille just "Button" when it should present the non-visual "Rich Text Test!" string that is associated with it. Problem #2: menu items are brailled, but not spoken: 1) Go to http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_Button.html 2) Tab to the "Edit!" menu and press "Down" to open it and go to the "Cut" item. Ignore the first problem where the first menu item is not spoken when the menu is opened. That's a whole separate bug (bug #569345). 3) Press "Down" again to go to the "Copy" item. 4) You'll notice Orca brailles the menu item, but doesn't speak it. There are a few things/interactions happening here. I'll work up a patch.
Created attachment 127332 [details] [review] First pass at the patch From a high level point of view, what I'm seeing is that Dojo is name happy. It likes to set the accessible name of an object to the text of whatever label might be labelling it, and it seems to prefer to defer to a labelled_by relation to hold the text for an object rather than creating accessible text for the object itself. The result is a fair amount of redundancy. This patch does two main things: 1) Modifies src/orca/scripts/toolkits/Gecko/script.py:getDisplayedText to return an object's name if there is neither accessible text or a label for the object. 2) Modifies src/orca/speechgenerator.py:_getSpeechForMenuItem to also include the label. This seems to be one of the few spots where the label was omitted, and it appears to be an accident. The other spots seem to be on purpose. I have not tested nor pylinted this patch.
Created attachment 127409 [details] [review] Patch committed to trunk Patch regression tests well and also works with the gmail list item issue. Committed to trunk.
Created attachment 127410 [details] [review] Patch committed to gnome-2-24 Here's a slightly different patch that was committed to gnome-2-24. The main difference is that the getSpeechForMenuItem area needed a minor tweak.