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 666463 - Orca needs to present the real modifier for 'Primary'
Orca needs to present the real modifier for 'Primary'
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
3.3.x
Other All
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-18 17:50 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2012-01-30 09:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A temporary fix for Orca level with hide this problem with visual impaired users (904 bytes, patch)
2012-01-02 10:37 UTC, Hammer Attila
none Details | Review
A temporary fix for Orca level with hide this problem with visual impaired users (904 bytes, patch)
2012-01-02 10:44 UTC, Hammer Attila
rejected Details | Review
Debug.out file (105.97 KB, application/octet-stream)
2012-01-30 09:53 UTC, Hammer Attila
  Details

Description Joanmarie Diggs (IRC: joanie) 2011-12-18 17:50:01 UTC
Recent changes in Gtk+ have resulted in the keybinding for accelerators exposing 'Primary' instead of 'Control' to assistive technologies via AtkAction. End users expect 'Control' and are likely not going to know what 'Primary' is. It would be most helpful to have 'Control' back as the name of the exposed modifier.

Some related IRC discussion snippets:

< Company> there's two things i have from the API    
< Company> 1) the programmatic thing - what you put in the ui file   
< Company> 2) the UI thing - what the user sees      
< Company> currently gtk gives you (1)
< Company> and with the invention of "primary" (which does the right thing depending on platform), lots of people use it                  
< Company> so you get that if you use (1)            
< Company> and apparently we've always used + in UIs, so if i change that...     
< Company> it would kinda help if we had a hardcoded keybinding format in atk instead of using some string :p          

[...]

< joanie> in the meantime, if you know that Primary is going to result in Ctrl, does this necessitate changeing the <> to +?       
< Company> it's a side effect of using the other function
< Company> one gives you what you see on screen      
< Company> the other gives you what you see in ui files or other configs

[...]

< Company> what you want is a mix between the two that would need to be manually coded

[...]

< Company> because since very recently, the function we used thinks it's now called <Primary>       
< Company> so we either need a new function          
< Company> or use the one for the UI  
< joanie> may we have a new function? 
< Company> maybe   
< Company> that's the more complicated fix, because it needs more code and figuring out why we need that function in the first place
< Company> do we need a function specific to a11y? Or is it just a case that should be handled in GTK?                 
< Company> and i'm not the input guru, so i need to argue with mitch first :)

[...]

< joanie> so what's the next step?
< Company> 1) figuring out what gtk needs            
< Company> 2) figuring out what a11y needs           
< Company> where (2) is better than "some random string with semicolons"
Comment 1 Benjamin Otte (Company) 2011-12-18 17:57:00 UTC
Adding mitch, so he can give an opinion on how to best do this.
Comment 2 Joanmarie Diggs (IRC: joanie) 2011-12-18 18:13:12 UTC
Adding Piñeiro to keep him in the loop. :)
Comment 3 Matthias Clasen 2011-12-19 04:58:32 UTC
Fixing this requires a clear specification of what the keybinding information in AtkAction is supposed to contain, exactly.
Comment 4 Hammer Attila 2012-01-02 10:37:20 UTC
Created attachment 204443 [details] [review]
A temporary fix for Orca level with hide this problem with visual impaired users

I simple added the primary key name in src/orca/keynames.py file, and associated the control translatable text if the i18n context is keyboard. I want prewenting translators need translating a new string (the primary keyname text).
Of course, this is a temporary fix only, but hide for users this bug until this bug is not fixed with GTK+, and will be users seeing right accelerator informations if using Orca.
I tested this fix way under GNOME3 my Ubuntu Precise system, I see right my braille display with hungarian translated control key name and speech output is right too.
Joanie, have a chance to commit this fix temporary with Orca master source branch until this bug is not fixed with GTK+?
Visual the screen what text presenting if an accelerator containing for example CONTROL+SHIFT+T keystroke an application?

Attila
Comment 5 Hammer Attila 2012-01-02 10:44:29 UTC
Created attachment 204444 [details] [review]
A temporary fix for Orca level with hide this problem with visual impaired users

I simple added the primary key name in src/orca/keynames.py file, and associated the control translatable text if the i18n context is keyboard. I want prewenting translators need translating a new string (the primary keyname text).
Of course, this is a temporary fix only, but hide for users this bug until this bug is not fixed with GTK+, and will be users seeing right accelerator informations if using Orca.
I tested this fix way under GNOME3 my Ubuntu Precise system, I see right my braille display with hungarian translated control key name and speech output is right too.
Joanie, have a chance to commit this fix temporary with Orca master source branch until this bug is not fixed with GTK+?
Visual the screen what text presenting if an accelerator containing for example CONTROL+SHIFT+T keystroke an application?

Attila
Comment 6 Joanmarie Diggs (IRC: joanie) 2012-01-02 12:11:23 UTC
Review of attachment 204444 [details] [review]:

Thanks Attila! Based on some conversations I've had with the Gtk+ developers, I am going to address this in Orca for now. In terms of the solution, we don't want to translate 'Primary' into 'Control' because 'Primary' does not necessarily and for certain mean 'Control'. (Yes, it likely does, but....) There are means within Gdk to obtain what the actual modifier is. Therefore, I will do that (as part of the refactor-in-progress).
Comment 7 Joanmarie Diggs (IRC: joanie) 2012-01-02 12:13:24 UTC
Taking this myself, fixing it in Orca.
Comment 8 Hammer Attila 2012-01-02 12:34:01 UTC
Joanie, I don't understand a think:
This "primary" text how identifying the actual modifier, and how can absolute sure detecting what the right modifier (Control, Alt, etc) for a key sequence?
I see only the primary style accelerators with control prefix accelerators (for example control+shift+t present with primary+shift+t my braille display), but absolute sure not have another cases with the "primary" text not meaning another modifier?
So what identifying this text for a key sequence?
Have another style magical texts this problem related, for example secondary text with identifying another modifier?
Sorry my possible silly questions. :-):-)

Attila
Comment 9 Joanmarie Diggs (IRC: joanie) 2012-01-29 15:01:01 UTC
(In reply to comment #8)
> Joanie, I don't understand a think:
> This "primary" text how identifying the actual modifier, and how can absolute
> sure detecting what the right modifier (Control, Alt, etc) for a key sequence?

Gtk+ provides a method to turn the string into a key plus modifiers: gtk_accelerator_parse().

Gtk+ also provides a method to turn a key plus modifiers into a user-presentable label: gtk_accelerator_get_label().

Fix committed to master. Please test.

http://git.gnome.org/browse/orca/commit/?id=1c5fe536358f3892e785862534336bf552b69926
Comment 10 Jose Vilmar Estacio de Souza 2012-01-29 17:00:46 UTC
(In reply to comment #9)
> Gtk+ provides a method to turn the string into a key plus modifiers:
> gtk_accelerator_parse().
> 
> Gtk+ also provides a method to turn a key plus modifiers into a
> user-presentable label: gtk_accelerator_get_label().
> 
> Fix committed to master. Please test.
> 
> http://git.gnome.org/browse/orca/commit/?id=1c5fe536358f3892e785862534336bf552b69926

Works fine.
One small observation is that  orca reads:
open terminal 
check item
not checked
shift+control+n

The word shift comes before the word control.
Comment 11 Joanmarie Diggs (IRC: joanie) 2012-01-29 17:07:57 UTC
 
> Works fine.
> One small observation is that  orca reads:
> open terminal 
> check item
> not checked
> shift+control+n
> 
> The word shift comes before the word control.

It does in the menu item as well. See, before what we did is present the keystroke as given to us by the toolkit through accessibility (AtkAction's keybinding). Now what we do is take the binding and ask Gtk+ what it is. We are not parsing anything anymore.

Do you find it problematic that the word shift comes before the word control?
Comment 12 Jose Vilmar Estacio de Souza 2012-01-29 20:39:12 UTC
(In reply to comment #11)
> > Works fine.
> > One small observation is that  orca reads:
> > open terminal 
> > check item
> > not checked
> > shift+control+n
> > 
> > The word shift comes before the word control.
> 
> It does in the menu item as well. See, before what we did is present the
> keystroke as given to us by the toolkit through accessibility (AtkAction's
> keybinding). Now what we do is take the binding and ask Gtk+ what it is. We are
> not parsing anything anymore.
> 
> Do you find it problematic that the word shift comes before the word control?
No!
Comment 13 Joanmarie Diggs (IRC: joanie) 2012-01-29 21:30:53 UTC
Okay, given that the fix seems to solve the problem, closing as FIXED. Thanks for the testing José!
Comment 14 Hammer Attila 2012-01-30 06:54:08 UTC
Tested the fix, works good.
Only have a little problem, with I don't no possible fixing or not:
In Orca translation, have a Control key name related translation string:
#. Translators: this is how someone would speak the name of the control key
#.
#: ../src/orca/keynames.py:50
msgctxt "keyboard"
msgid "Control"
msgstr "Kontrol"

Now, Orca send SHIFT+CONTROL+F4 accelerator with following style with hungarian locale:
Close Window
SHIFT+CTRL+F4
Possible associate the CTRL short control key name with long Control string? I think this is resolve this translation related issue if this fix way is accepted.

Attila
Comment 15 Joanmarie Diggs (IRC: joanie) 2012-01-30 09:32:00 UTC
What is on the screen is not 'Control' but 'Ctrl'. Personally, I think that if a user doesn't like how a word on the screen is pronounced, it should be changed in Orca's pronunciation dictionary or via the synthesizer itself by that user. I'm not all that comfortable taking on-screen text and turning it into something it is not on behalf of all users.
Comment 16 Hammer Attila 2012-01-30 09:47:37 UTC
I don't see the screen, but because CTrl present the screen, I full agree with your comment. Possible I missunderstood with oldest GNOME releases presented me with following style the close menu item in terminal:
Close
Shift CTRL Q
Interesting, but in Orca Xdesktop version right I hear Ctrl text with Kontrol translated text. Ask me wife, visualy the screen Ctrl text seeing (GNOME 2.30 release).
Just a moment, I doing a debug.out file.

Attila
Attila
Comment 17 Hammer Attila 2012-01-30 09:53:31 UTC
Created attachment 206404 [details]
Debug.out file

Look what output sending Orca-xdesktop version:
PREPARATION TIME: 0.0012
generate speech for unfocused app.name='gnome-terminal' name='Ablak bezárása' role='menu item' state='enabled focused selectable selected sensitive showing visible' relations='' (args={'recursing': True, 'priorObj': <CORBA.Object 'IDL:Accessibility/Accessible:1.0' at 0x2cc92f0>, 'role': ROLE_MENU_ITEM, 'mode': 'speech', 'formatType': 'unfocused'}) using 'newAncestors + newRowHeader + newColumnHeader + newRadioButtonGroup + labelAndName + menuItemCheckedState + availability + (mnemonic and (pause + mnemonic + lineBreak) or []) + accelerator + pause + positionInList + newNodeLevel + unselectedCell + (tutorial and (pause + tutorial) or [])'
script_utilities.commonAncestor...
...script_utilities.commonAncestor
GENERATION  TIME: 0.0005  ---->  newAncestors=[]
GENERATION  TIME: 0.0003  ---->  newRowHeader=[]
GENERATION  TIME: 0.0002  ---->  newColumnHeader=[]
GENERATION  TIME: 0.0002  ---->  newRadioButtonGroup=[]
GENERATION  TIME: 0.0003  ---->  labelAndName=['Ablak bez\xc3\xa1r\xc3\xa1sa', {u'average-pitch': 3.0, u'rate': 85.0, u'gain': 10.0}]
GENERATION  TIME: 0.0008  ---->  menuItemCheckedState=[]
GENERATION  TIME: 0.0008  ---->  availability=[]
GENERATION  TIME: 0.0006  ---->  mnemonic=[u'a', {}]
GENERATION  TIME: 0.0003  ---->  pause=[<orca.speech_generator.Pause instance at 0x2786c68>]
GENERATION  TIME: 0.0002  ---->  lineBreak=[<orca.speech_generator.LineBreak instance at 0x2786cb0>]
GENERATION  TIME: 0.0003  ---->  accelerator=[u'Shift Kontrol q', {}]
GENERATION  TIME: 0.0096  ---->  positionInList=['5 per 5.', {}]
GENERATION  TIME: 0.0006  ---->  newNodeLevel=[]
GENERATION  TIME: 0.0008  ---->  unselectedCell=[]
GENERATOR: _getTutorialForPushButton
           obj             = Ablak bezárása
           role            = menu item
           alreadyFocused  = False
           utterances:
               (Aktiválásához nyomja meg a szóköz billentyűt.)
GENERATOR: getTutorial
           obj             = Ablak bezárása
           role            = menu item
           alreadyFocused  = False
           utterances:
               (Aktiválásához nyomja meg a szóköz billentyűt.)
GENERATION  TIME: 0.0011  ---->  tutorial=['Aktiv\xc3\xa1l\xc3\xa1s\xc3\xa1hoz nyomja meg a sz\xc3\xb3k\xc3\xb6z billenty\xc5\xb1t.', {}]
COMPLETION  TIME: 0.0196
generate speech results:
  Ablak bezárása
  {u'average-pitch': 3.0, u'rate': 85.0, u'gain': 10.0}
  <orca.speech_generator.Pause instance at 0x2786c68>
  a
  {}
  <orca.speech_generator.LineBreak instance at 0x2786cb0>
  Shift Kontrol q
  {}
  <orca.speech_generator.Pause instance at 0x2786c68>
  5 per 5.
  {}
  <orca.speech_generator.Pause instance at 0x2786c68>
  Aktiválásához nyomja meg a szóköz billentyűt.
  {}
SPEECH OUTPUT: 'Ablak bezárása.'
SPEECH OUTPUT: 'a'
SPEECH OUTPUT: 'Shift Kontrol q.'
SPEECH OUTPUT: '5 per 5.'
SPEECH OUTPUT: 'Aktiválásához nyomja meg a szóköz billentyűt.'

Attila