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 585948 - Automatic position index spoken request
Automatic position index spoken request
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
2.27.x
Other All
: Normal enhancement
: 2.28.0
Assigned To: Willie Walker
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-16 07:28 UTC by Hammer Attila
Modified: 2009-11-09 21:35 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
This is a first rewision this function. (10.80 KB, patch)
2009-06-18 07:30 UTC, Hammer Attila
none Details | Review
Second revision. (10.80 KB, patch)
2009-06-18 07:51 UTC, Hammer Attila
none Details | Review
This is the new, I hope final version. (16.18 KB, patch)
2009-06-19 07:12 UTC, Hammer Attila
none Details | Review
Actualized patch for latest Orca source code (14.39 KB, patch)
2009-07-27 13:06 UTC, Hammer Attila
none Details | Review
Slightly revised patch (14.13 KB, patch)
2009-07-27 17:14 UTC, Willie Walker
none Details | Review
Patch that was committed. (15.40 KB, patch)
2009-07-27 18:42 UTC, Willie Walker
committed Details | Review
Cut the item word with src/orca/speech_generator.py file with 1313 line number. (559 bytes, patch)
2009-07-28 12:24 UTC, Hammer Attila
none Details | Review

Description Hammer Attila 2009-06-16 07:28:10 UTC
Dear Developers!

I have got an ydea when I work Orca pause speech formatting with yesterday.
I would like do a short automatic position index spoken feature when the user navigate the desktop icons, list views, radio buttons, combo boxes etc.
How works this function?
When the user navigating for example with the desktop icons, Orca spoken following the informations:
For example, the desktop have six icons, and the user navigate with the first icon:
"Computer icon 1/6"
The user Press down arrow:
"hammera folder icon 2/6"
1/6, 2/6 etc means following:
The first number means what the actual position with in the layered pane (for example with the computer icon index with the list), and the second number means what the total number of icons.

What need?
1. One check box with speech page, because if the user does'nt would like this feature, possible turn off. Or another method, this feature turned off by default, if the user would like this function, check the check box and use the function, for example with mnemonic spokening function.
2. If I known right, need edit with the src/orca/speechgenerator.py file to add this output with utterances when the check box is checked. Or this function now possible put with src/orca/formatting.py file?

I think translation of the 1/6, 2/6 output is not need, because this is an universal form, usual screen readers uses this form.

If you would like, I try make this function. Not promise sure with 2.27.4 release, because I would like complete the formatting.py editing and fix my another opened bugs before work this function.

Thanks,

Attila
Comment 1 Willie Walker 2009-06-17 14:03:58 UTC
Hi Attila:

You can add this feature for icons simply by adding the following lines to your ~/.orca/user-settings.py or ~/.orca/orca-customizations.py file:

import orca.formatting
import pyatspi
orca.formatting.formatting['speech'][pyatspi.ROLE_ICON]['unfocused'] = \
    'labelAndName + imageDescription + roleName + positionInList'

What the above is doing is overriding the default formatting string, allowing you to customize the content to your needs.

Will

PS - You need the latest code from git master -- I had to make a change to _generatePositionInList to fallback to the parent of an object if the object wasn't of a role that we were expecting.
Comment 2 Hammer Attila 2009-06-17 15:35:09 UTC
Unfortunately, your suggestion is not work. Nothing changed. I try add this code with orca-customizations.py file and src/orca/formatting.py.

Attila
Comment 3 Willie Walker 2009-06-17 15:38:46 UTC
(In reply to comment #2)
> Unfortunately, your suggestion is not work. Nothing changed. I try add this
> code with orca-customizations.py file and src/orca/formatting.py.
> 
> Attila
> 

With the changes in place (and making sure you have pulled/built/installed from the latest git master), try:

1) Ctrl+Alt+d to display the desktop
2) Arrow down to select an icon

You should hear the position information spoken.  If not, you might have a syntax error in the file(s) you've edited.
Comment 4 Hammer Attila 2009-06-17 17:30:57 UTC
I forgot update. :-(
Works this method, now I insert default with src/orca/formatting.py file, but result long spokened text.
For example the hungarian translation file have following long string, for example with where am I usable is good, but not this situation:
#. Translators: this is an item in a list.
#.
#: ../src/orca/speech_generator.py:1904 ../src/orca/speech_generator.py:1984
#, python-format
msgid "item %(index)d of %(total)d"
msgstr "%(index)d. elem, összesen %(total)d"

Where am I not this string use when say the user what the current item index and how many items on the list?

So:
What your openion? We do  would like toggle this feature with check box, or insert this method with all controls with have list index with src/orca/formatting.py file? If all specification is clear, I begin work this function.

Attila
Comment 5 Willie Walker 2009-06-17 17:52:41 UTC
(In reply to comment #4)
> Where am I not this string use when say the user what the current item index
> and how many items on the list?

I'm having trouble understanding what you're asking.  :-(

> So:
> What your openion? We do  would like toggle this feature with check box, or
> insert this method with all controls with have list index with
> src/orca/formatting.py file? If all specification is clear, I begin work this
> function.

My opinion is that this feature would add annoying chattiness to focus tracking no matter what word choice is made.  Unless you have a very strong use case for having this information spoken during focus tracking, I think this belongs in only the Where Am I information.  Doing it there would also help prevent adding more clutter to the configuration GUI.
Comment 6 Hammer Attila 2009-06-18 04:44:36 UTC
Ok, I try longer write what I would like hear when the icon is unfocused or focused:
When I add src/orca/formatting.py with positionInList for example with pyatspi.ROLE_ICON with focused amd unfocused lines, now result following output when the icon is selected:
"computer icon on item 1 of 6"
This is good in english, but when I use hungarian locale, I hear following long text:
"számítógép ikon 1 elem kijelölve, 6 elemből."
When the icon selected or unfocused, I would like hear following result with normal navigation, not where am I or detailed where am I:
"Computer icon 1/6"
When the user using where am I or detailed where am I operation, this result is good, not need change:
Where am I: "Icon panel. Computer icon. 1 of 6 items selected. On item 1 of 6."
Detailed where am I:
"Iconpanel. Computer Icon. 1 of 6 items selected. On item 1 of 6. Computer"
In hungarian translation:
Where am I: "Ikonpanel. Számítógép. 1 elem kijelölve, 6 elemből. 1 elem, összesen 6."
Detailed where am I: "Ikonpanel. Számítógép. 1 elem kijelölve, 6 elemből. 1 elem, összesen 6. számítógép."

How can replace the "on item 1 of 6" string only with focused or unfocused situations with "1/6, 2/6" form, but not change where am I or detailed where am I output?

Attila
Comment 7 Hammer Attila 2009-06-18 07:30:26 UTC
Created attachment 136902 [details] [review]
This is a first rewision this function.

This is an experimental first version of this function, please not commit now.
What can I do?
1. Now I nod do yet a checkbox with configuration GUI.
First I separate with position in group (1904. line with speech_generator.py) output and position in list output (1984 line in speech_generator.py). Need change the 1984 line output string because after change this line, possible translate another text with this output.
Now I translate with this output with 1/6 form with hungarian translation file.
2. Insert positionInList with all important role object with focused and unfocused lines with src/orca/formatting.py file. Please no  surprise, because I not end with the pause bug (bug 585417), now I add the pause patch with src/orca/formatting.py file before I begin work this function. Of course, final patch not contains another bug patches.
One problem with this first patch: if any object where am I or detailed where am I using positionInList with src/orca/formatting.py file, the changed output spokening with short form for example with hungarian language. For example if I press where am I command with a menu item, Orca now says following output (I translating english):
"main menu. accessibility menu. a 1/13"
 I don't known this is problem with another not english language users or not.

Attila
Comment 8 Hammer Attila 2009-06-18 07:51:45 UTC
Created attachment 136903 [details] [review]
Second revision.

This is the second release. I mistake the menu and menu items where am I item spokening, now fixed.
Comment 9 Hammer Attila 2009-06-19 07:12:12 UTC
Created attachment 136974 [details] [review]
This is the new, I hope final version.

This is the 3. release of this function, i hope this is the final release. Please look if you have a little time.
Doed modifications and differences with prewious version:
1. Have checkbox and possible toggle this function with Orca GUI preferences/speech page.
2. This feature is turned off by default with src/orca/settings.py file, if the User would like the automatic spokening position indexes function, check the checkbox and use this function. Because this feature is turned off by default, not disturb another users if they would like old Orca speech method, similar with tutorial messages check box or mnemonic spokening feature.

3. Where am I work all time, because I insert forceList parameter with src/orca/where_am_I.py file.
4. I change speech order with positionInList with src/orca/formatting.py file by importance with 'focused' and 'unfocused' lines. For example if the user navigate a menu, higher priority with the mnemonic and accelerator information, the positionInList spokened after this informations spokened.

Attila
Comment 10 Hammer Attila 2009-07-27 13:06:13 UTC
Created attachment 139280 [details] [review]
Actualized patch for latest Orca source code

Will, I actualized my feature patch with new Orca source code.
This is the final release. If you does'nt found critical problem my patch, I am ready with this feature.
The patch use the useExperimentalSpeechProsody setting determining pauses needs or not.
Now default enabled my feature (enablePositionindexSpeaking setting is true), but fel free modify this setting to false if you would like.

Attila
Comment 11 Willie Walker 2009-07-27 17:14:26 UTC
Created attachment 139300 [details] [review]
Slightly revised patch

This is a slightly revised patch. I'm leaning towards not enabling the feature by default since it adds a bunch of verbosity we've never had.

In addition, should we also consider adding this to braille?
Comment 12 Hammer Attila 2009-07-27 17:53:30 UTC
If I understand right, you would like add this feature both speech and braille formatting output?
Very good ydea, but now I have'nt got a braille display device. But good news, wednesday I get an 20 cell braille display with me blind collage, and this display have me with 2009 september.
What important to do if we would like this feature both speech and braille output? Speech output is fullready.
We done this entire feature (speech and braille function) before UI freeze? What the UI freeze date?

Attila
Comment 13 Willie Walker 2009-07-27 18:42:00 UTC
Created attachment 139309 [details] [review]
Patch that was committed.
Comment 14 Willie Walker 2009-07-27 18:46:46 UTC
(In reply to comment #12)
> If I understand right, you would like add this feature both speech and braille
> formatting output?
> Very good ydea, but now I have'nt got a braille display device. But good news,
> wednesday I get an 20 cell braille display with me blind collage, and this
> display have me with 2009 september.
> What important to do if we would like this feature both speech and braille
> output? Speech output is fullready.
> We done this entire feature (speech and braille function) before UI freeze?
> What the UI freeze date?

I just committed the speech portion.  I think we can open a new bug for the braille portion and close this one.
Comment 15 Mike Pedersen 2009-07-27 21:20:05 UTC
I agree with Will that this can be closed with the default being off.  

If anyone wants to file a braille bug I feel that this information should be at the end of the braille context.  
Comment 16 Jose Vilmar Estacio de Souza 2009-07-28 09:53:42 UTC
Nice feature.
As a small suggestion, could be possible omit the word item when verbose is set to brief?
For example:
Instead of "file menu, item 1 of 7" orca could announce "file menu, 1 of 7".

Another place wher this feature would be useful, is in thunderbird. Would be nice to hear the  message position and the number of messages.
Comment 17 Hammer Attila 2009-07-28 11:55:59 UTC
Jose, if I understand right, you would like hear this format when the verbosity set in brief:
"File menu, 1 of 7" so, disturb you with "item" word?
I think understand your problem.

Now, I edit my hungarian translation file, because too long the original hungarian output of this string and chhange following form only the translated string:
#. Translators: this is an item in a list.
#.
#: ../src/orca/speech_generator.py:1231 ../src/orca/speech_generator.py:1313
#, python-format
msgid "item %(index)d of %(total)d"
msgstr "%(index)d/%(total)d"

The original long hungarian translated output of this string was following and disturb me always when this feature toggled:
msgid "item %(index)d of %(total)d"
msgstr "%(index)d elem, összesen %(total)d"
So, the problematic part the "item" word with original text.
I have simple  ydea, I think this is good all people and not need verbosity toggle:
Need cut this string with two strings, a shorter and the longer form. The shorter form not contains the "item" word and equals with Jose wish when this feature is active, the longer form using where am I output command when user do where am I command (item %(index)d of %(total)d) string.
Will, what line number toggle with where am I output in
src/orca/speech_generator.py file? the 1231 line or 1313 line producing where am I message?

Jose, you wroted your prewious comment:
"Another place wher this feature would be useful, is in thunderbird. Would be
nice to hear the  message position and the number of messages."
Very good ydea, Ok, I do. One question: you better would like the position index information with all tables (Evolution, Pidgin for example), or enough this function with Thunderbird only? Will, not do this modification problem with Openoffice.org Writer table navigation, Firefox, etc?

Attila






Comment 18 Willie Walker 2009-07-28 12:19:02 UTC
If the word "item" is to verbose regardless of the locale, we should just remove it and then update all the regression tests accordingly.  We need to do so soon, however, since string freeze is approaching.  Mike - what are your thoughts?
Comment 19 Hammer Attila 2009-07-28 12:24:45 UTC
Created attachment 139379 [details] [review]
Cut the item word with src/orca/speech_generator.py file with 1313 line number.

Jose, please test this patch. Now nod do your Thunderbird request, but I not forgotten.

Attila
Comment 20 Hammer Attila 2009-07-28 12:36:35 UTC
I tested my prewious patch with Us english locale. Correct says for example with Jose would like:
Accessories menu, 1 of 13"
So, I think Jose first problem is solved.
Not disturb this change with another non english language translators, because this string is translatable.
Very near with string freeze? Anybody send me with current important GNOME dates mí e-mail address (UI freeze date, string freeze date etc)?

What happen with Jose Thunderbird request? Will we done this before any important freeze?

Attila

Comment 21 Willie Walker 2009-07-28 12:56:34 UTC
(In reply to comment #19)
> Created an attachment (id=139379) [edit]
> Cut the item word with src/orca/speech_generator.py file with 1313 line number.

There are a couple lines with "item" in them:

wwalker@opensolaris:~/work/orca/src/orca$ find . -name \*.py | xargs grep '"item'
./speech_generator.py:            result.append(_("item %(index)d of %(total)d") \
./speech_generator.py:            result.append(_("item %(index)d of %(total)d") \
wwalker@opensolaris:~/work/orca/src/orca$ cat -n speech_generator.py | grep '"item'
  1231              result.append(_("item %(index)d of %(total)d") \
  1313              result.append(_("item %(index)d of %(total)d") \

The reason I put "[mike]" on this bug is to get an opinion from our UI lead before making this change.  While changing these two lines is trivial in one respect, it causes a significant amount of work in another: all the regression tests need to be rerun, changed, and rerun again.  So, before making this change, I want to make sure it's what we really want to do.

(In reply to comment #20)
> Very near with string freeze? Anybody send me with current important GNOME
> dates mí e-mail address (UI freeze date, string freeze date etc)?

http://live.gnome.org/TwoPointTwentyseven -- please note that I want to be a bit more conservative this release.  That is, I don't want to push things as close as we can to the cut off dates.  The reason for this is that we have had a significant number of high impact changes already and I want us to spend a bit more time testing/hardening those things.

> What happen with Jose Thunderbird request? Will we done this before any
> important freeze?

The Thunderbird request is an enhancement request. I'd like to give priority to bug fixes at this point in the release.  If someone provides a patch, however, I will review it for this release.
Comment 22 Jose Vilmar Estacio de Souza 2009-07-28 13:04:24 UTC
(In reply to comment #17)
> Jose, you wroted your prewious comment:
> "Another place wher this feature would be useful, is in thunderbird. Would be
> nice to hear the  message position and the number of messages."
> Very good ydea, Ok, I do. One question: you better would like the position
> index information with all tables (Evolution, Pidgin for example), or enough
> this function with Thunderbird only? Will, not do this modification problem
> with Openoffice.org Writer table navigation, Firefox, etc?
> 
> Attila
> 
With all tables would be very good.
Comment 23 Jose Vilmar Estacio de Souza 2009-07-28 13:23:33 UTC
A small problem is that when I press the f10 key to activate the menu bar, I hear the "file menu" but orca doesn't announce the index position. If I press right and left keys, the item position is announced.
Comment 24 Willie Walker 2009-07-28 13:28:55 UTC
(In reply to comment #23)
> A small problem is that when I press the f10 key to activate the menu bar, I
> hear the "file menu" but orca doesn't announce the index position. If I press
> right and left keys, the item position is announced.

Works for me with gnome-terminal.  Which application are you using?
Comment 25 Jose Vilmar Estacio de Souza 2009-07-28 14:13:28 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > A small problem is that when I press the f10 key to activate the menu bar, I
> > hear the "file menu" but orca doesn't announce the index position. If I press
> > right and left keys, the item position is announced.
> 
> Works for me with gnome-terminal.  Which application are you using?
> 
Firefox, thunderbird, pidgin, gedit ...
Comment 26 Hammer Attila 2009-07-28 14:36:18 UTC
I look your wroted applications and your step to reproduce the problem.
Firefox: I press f10 key, I hear:
"file menu, 1 of 7"
Thunderbird: I press f10 key, I hear:
"file menu, 1 of 7"
Gnome-terminal: I press f10 key, I hear:
"file menu f 1 of 5"
Pidgin: I press f10 key, I hear:
"Buddyes menu b 1 of 4"

So, I can not reproduce your problem. I try this function with Ubuntu Jaunty, GNOME2-26 and 2.27.90pre Orca version.

Attila
Comment 27 Jose Vilmar Estacio de Souza 2009-07-28 15:03:01 UTC
(In reply to comment #26)
> I look your wroted applications and your step to reproduce the problem.
> Firefox: I press f10 key, I hear:
> "file menu, 1 of 7"
> Thunderbird: I press f10 key, I hear:
> "file menu, 1 of 7"
> Gnome-terminal: I press f10 key, I hear:
> "file menu f 1 of 5"
> Pidgin: I press f10 key, I hear:
> "Buddyes menu b 1 of 4"
> 
> So, I can not reproduce your problem. I try this function with Ubuntu Jaunty,
> GNOME2-26 and 2.27.90pre Orca version.
> 
> Attila
> 

I believe to be found the guilty! :-)
I am running with a configuration similar to yours. However I am running Ibm ViaVoice as my synthesiser. When I changed to ESpeak the problem has gone. Changing back to Ibm ViaVoice the problem appeared again.
Comment 28 Mike Pedersen 2009-07-28 15:44:56 UTC
I'm perfectly OK with just removing the word "item" if that is what everyone wants.  
Comment 29 Willie Walker 2009-07-28 21:41:47 UTC
(In reply to comment #28)
> I'm perfectly OK with just removing the word "item" if that is what everyone
> wants.  
> 

I opened the "item" word removal as bug #590070.  Please open the table row index (and possibly table column index?) suggestion as a separate enhancement request.  Thanks!