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

extensionPoints: Notify when NVDA is in browse mode #14969

Closed
nvdaes opened this issue Jun 6, 2023 · 7 comments · Fixed by #15450
Closed

extensionPoints: Notify when NVDA is in browse mode #14969

nvdaes opened this issue Jun 6, 2023 · 7 comments · Fixed by #15450
Labels
Addon/API Changes to NVDA's API for addons to support addon development. p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Jun 6, 2023

Is your feature request related to a problem? Please describe.

Add-ons may need to be notified when NVDA is in browse mode, for example to activate and deactivate profiles when entering and exiting browse mode, respectively.

Describe the solution you'd like

Add extensionPoints to notify when NVDA is in browse modeor not (i.e., in focus mode or not in a treeInterceptor).

Describe alternatives you've considered

Adda profile trigger for browse mode, which may take priority over the profile application trigger.

Additional context

Sometimes maybe useful to change voice settings to read in browse mode. This has been requested by a member of the spanish community on a Telegram group.

@XLTechie
Copy link
Contributor

XLTechie commented Jun 6, 2023 via email

@nvdaes
Copy link
Sponsor Contributor Author

nvdaes commented Jun 6, 2023

I think that globalVars maybe deprecated in future. In addition, not just focus mode, but also when an object doesn't have a tree interceptor should be addressed.

@seanbudd seanbudd added p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority Addon/API Changes to NVDA's API for addons to support addon development. triaged Has been triaged, issue is waiting for implementation. labels Jun 8, 2023
@nvdaes
Copy link
Sponsor Contributor Author

nvdaes commented Sep 13, 2023

Since this has been triaged, I may start working on this. For the primary purpose of this issue, notifying about changes in review.getReviewMode maybe appropriate.

@nvdaes
Copy link
Sponsor Contributor Author

nvdaes commented Sep 13, 2023 via email

@nvaccessAuto nvaccessAuto added this to the 2024.1 milestone Sep 21, 2023
seanbudd pushed a commit that referenced this issue Sep 21, 2023
…r inactive (#15450)

fixes #14969

Summary of the issue:
Sometimes, it would be desirable perform actions when browse mode state changes. For example, this may be useful to activate or deactivate a profile when entering or exiting browse mode.

Description of user facing changes
Add-ons and other components can be notified about browse mode state changes.
Description of development approach
A treeInterceptorHandler.post_browseModeStateChange extension point has been added. The browseMode parameter represents the state of browse mode (True or False).
@ramoncorominas
Copy link

Additionally, a preBrowseModeSwitch maybe added

to allow add-ons, for example, to decide if changes should be reported
playing a sound, but I don't have a real use case for the pre action.

Maybe an addon could use this to prevent switching to browse mode, for example in an Electron app, where (initially) the browse mode would make the app unusable. I'm thinking in VSCode, but certainly it uses browse mode for previewing markdown as HTML, but maybe other apps would benefit from this.

@nvdaes
Copy link
Sponsor Contributor Author

nvdaes commented Nov 6, 2023

@ramoncorominas commented

Maybe an addon could use this to prevent switching to browse mode, for example in an Electron app

I don't know if this use case is valid, since profiles associated to apps may prevent switching to browse mode when the webpage is loaded. You may want to open a new issue to see if this proposal is accepted.

@ramoncorominas
Copy link

@nvdaes commented:

I don't know if this use case is valid, since profiles associated to apps may prevent switching to browse mode when the
webpage is loaded.

Sorry, it was not my intention to make a proposal, I was just trying to imagine a possible use case for preBrowseModeSwitch . I assume that not every Electron app would load a webpage somewhere, so I guess in those cases preventing browse mode would not harm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Addon/API Changes to NVDA's API for addons to support addon development. p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants