Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

focus existing NVDA Settings dialog if the same dialog is attempted to be opened again instead of presenting Error dialog #5383

Closed
nvaccessAuto opened this issue Sep 21, 2015 · 11 comments · Fixed by #12800

Comments

@nvaccessAuto
Copy link

Reported by bhavyashah on 2015-09-21 16:57
STR

  • Press NVDA + Ctrl + V to open the NVDA Voice Settings dialog.
  • Now, retain your position or go elsewhere, and press NVDA + Ctrl + V once again.
    Expected Result: Focus should move to the Voice Settings dialog itself, because, apparently, the user wishes to access the same dialog.
    Actual Result: The Error dialog is presented informing the user that an NVDA settings dialog is already open and only upon it closure can another dialog be opened.
    My conclusive request here is that the focus move to the dialog itself when one tries to open it, unaware that it is already open. The user's ultimate intention is to access that dialog and he might still prefer the keystroke over Alt Tabbing to it if too many windows are open.
    In my case, I prefer to always keep the Voice Settings dialog open alongside any work I do, because background noise around me tends to fluctuate. Accordingly, I continuously and conveniently change the volume of NVDA's speech. While closing multiple windows, or due to other reasons, I sometimes close the dialog, but, when it is already open, the Error dialog quite a bit annoys me, because it simply informs me that it is already open, and I still need to navigate to it manually.
    I hope my request has been clearly expressed and substantially justified.
@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2015-09-22 06:18
Sounds reasonable. Could be tricky to implement, though.

@nvaccessAuto
Copy link
Author

Comment 2 by jteh on 2015-09-22 11:44
This request is still valid, but just in case you're not aware, you could quickly change the volume without using the Voice Settings dialog at all using the Synth Settings Ring.

@nvaccessAuto
Copy link
Author

Comment 3 by briang1 on 2015-09-22 11:47
Hmm, you would need a new variable unless the opened dialogue already has a persistant one for this purpose and check it in the error generation code and decide what to do from that.

I'd not know how to do this in Python though.

@nvaccessAuto
Copy link
Author

Comment 4 by jteh on 2015-09-22 11:51
Having a variable with the current instance is relatively trivial. My concern is that we may end up with a circular reference and circular references can cause memory leaks in Python if not managed properly. Thus, this would need some pretty careful testing.

@LeonarddeR
Copy link
Collaborator

@feerrenrut, any thoughts about this?

@feerrenrut
Copy link
Contributor

I haven't thought this through at all, but my first thought on how to approach this would be replacing the boolean _hasInstance with a composite type, including the class type of the instance (and None when there is none) and a function to give it focus, perhaps even a function to close it. Then the check can tell if the dialog attempting to be opened is the same as already opened and give it focus. This approach could also help when exiting of NVDA is blocked due to an open dialog. Care will need to be taken in the exit case, to avoid losing unsaved changes.

@Qchristensen
Copy link
Member

Now that we have a combined settings dialog, does that make implementing this easier? I can see a situation where even with the dialog still focussed, you might be in the keyboard settings section and want to go to the voice settings, so you press NVDA+control+v. Ideally this should simply change to that settings page.

@LeonarddeR
Copy link
Collaborator

I think it shouldn't be very difficult to do indeed.

@JulienCochuyt
Copy link
Collaborator

UX proposal:
When attempting to open an NVDA dialog while one is already open:

  • If this is the same dialog (including a different category in settings), just bring it forward and focus it (eventually switching categories)
  • if this is a different dialog, show the current error message, but offer the possibility to focus the previously opened dialog with OK or to cancel the request - as is currently done by pressing OK.

What do you think?

@cary-rowen
Copy link
Contributor

Is there any new progress on this issue? I think this kind of error prompt will make people feel unacceptable and confused. If this is improved, it will undoubtedly improve the user experience to a large extent.

@seanbudd
Copy link
Member

seanbudd commented Sep 2, 2021

@cary-rowen - #12800 looks like an easy fix. If this doesn't fix the issue though, following it up might not be prioritised unless someone can take it over.

seanbudd added a commit that referenced this issue Sep 2, 2021
… when launching a dialog which is already open (#12800)

Fixes #5383

Summary of the issue:
NVDA raises an error when launching a dialog, when the dialog is already open. This is unfriendly to the user, and should instead focus the open dialog.

Example:
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Change a setting, so that you can confirm a new instance isn't created
Minimise the settings dialog window
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
An error message is raised
Description of how this pull request fixes the issue:
Set focus on existing dialog rather than raise an error if the dialog when launching a dialog which is already open.

Testing strategy:
Manual testing:
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Change a setting, so that you can confirm a new instance isn't created
Minimise the settings dialog window
Press NVDA+n to open the NVDA menu
Launch the settings dialog by pressing p then s
Confirm the same settings dialog from before is now focused, a new instance was not created, and the error message dialog isn't opened.
@nvaccessAuto nvaccessAuto modified the milestone: 2021.3 Sep 2, 2021
seanbudd pushed a commit that referenced this issue Jan 25, 2022
Link to issue number:
Follow-up of #12967

Summary of the issue:
Since the merge of #12800, trying to re-open an already opened dialog allows to focus it rather than issuing an error message box. The dialog is refocused according to its class, i.e. trying to open a dialog of the same class rather refocus the first already opened dialog of the same class.

But with #12800, it was not possible to open 2 dictionaries of different type (e.g. speech and default). This was fixed with #12967 by subclassing DictionaryDialog.
However, addons which directly use DictionaryDialog will still have the issue of opening 2 dictionaries at once i.e. #5383.

Description of how this pull request fixes the issue:
force DictionaryDialog to be subclassed by making the initializer and abstract method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants