Skip to content

Final master to beta merge for 2023.2#15178

Merged
seanbudd merged 38 commits into
betafrom
master
Jul 24, 2023
Merged

Final master to beta merge for 2023.2#15178
seanbudd merged 38 commits into
betafrom
master

Conversation

@seanbudd

@seanbudd seanbudd commented Jul 24, 2023

Copy link
Copy Markdown
Member

Final merge for 2023.2 release, using commit 1ffad7d from master.
Changes intended for 2023.2 must now set base/target to the beta branch

Merge not squash

JulienCochuyt and others added 30 commits June 20, 2023 12:28
… response (#10308)

Related to #7197, but does not solve it.

Summary of the issue:
In browse mode, in the Elements List dialog, speed typing a filter string leads to slow responsiveness from the UI and NVDA itself.

Description of how this pull request fixes the issue:
lightly delay the refresh of the elements list by 300 ms. (same technique as PR #10307)

---------

Co-authored-by: Leonard de Ruijter <leonardder@users.noreply.github.com>
Co-authored-by: Sean Budd <sean@nvaccess.org>
Janitorial update for eSpeak.

No noted new languages or major changes.
The 2023.2 changelog has gotten quite large.
2023.2 is a big release, and the changes could be grouped further.

Description of user facing changes
Changes in the changelog have been regrouped and reordered.
Better solution for #1409. Addresses #14896 (comment). Also addresses feedback I received on Mastodon regarding the NVDA sounds volume not appearing in the Windows Volume Mixer in some versions of Windows.

Summary of the issue:
In Support for audio output using WASAPI #14697, I split NVDA speech and sounds into two separate Windows audio sessions to allow independent control of their levels. However, some users want these levels to be linked.
In Add setting to have the volume of NVDA sounds follow the voice volume. #14896, I made it possible to have the sounds volume follow the voice volume. However, as per Add setting to have the volume of NVDA sounds follow the voice volume. #14896 (comment), some synths don't set the volume in a linear way, so the volumes don't match.
It was reported to me on Mastodon that in Windows 11 Insider builds, the "NVDA sounds" volume doesn't show up in the Windows Volume Mixer unless you actively play a sound while the Volume Mixer is running. This is not very intuitive, and if this is behaviour Microsoft intends to keep, it isn't going to work well for our users.
Having the volume of NVDA sounds controlled outside of NVDA is a little cumbersome.
Description of user facing changes
There will now only be one entry for NVDA in the Windows Volume Mixer which will control all NVDA audio.
There will be a slider in NVDA Advanced Settings to control the volume of sounds.
Description of development approach
Removed the ability to set a WASAPI session and volume.
Added a method to set the volume of a stream. This also allows you to set the volume of individual channels, though that's not used yet.
Added a slider in Advanced Settings to control the volume of NVDA sounds. This is disabled if the sound volume is following the voice volume.
…#15051)

Fixes #14750

Summary of the issue:
If a braille display is initialized, but then disconnected, the input gestures dialog cannot be opened.

Description of user facing changes
Description of development approach
As per handling in scriptHandler, we must check the existence of braille handler display before fetching gestureMap
Fixes #15042

Summary of the issue:
The title of add-on store window is formatted such as "Add-on Store - All Installed add-ons"
After the dash, the string is a concatenation of the channel and the type of add-ons in the list.

In English,it makes something almost grammatically correct to build a single expression (if we ignore case). But in other languages, this concatenation without any separator may produce stranger results that sound bad.
Also, it has been noted that the type of add-on listed ("Available add-ons" in this example) is much more important than the channel; thus it should come first.
Description of user facing changes
Reworked the window title to create a title such as "Add-on Store - Installed add-ons (All)"
While at it, also removed the channel in the list name as pointed in Modify the add-on store title bar text #15042 (comment), that is, the list's name is now "Available add-ons" instead of "All Available add-ons" so that the list name is less verbose.
Description of development approach
Implemented changes described below.

Note: I have used parenthesis for the channel, but I may have used a second dash as a separator instead, i.e. "Add-on store - Available add-ons - All". Let me know if you prefer this second version.
Follow up of #15021

Summary of the issue:
The deprecation was incorrectly documented, missing the module name and referring to NVDAState.WritePaths.speechDictsDir instead of WritePaths.speechDictsDir.

The change also caused some issues for add-ons who were relying on the deprecated code being imported into a different module.

Description of user facing changes
N/A

Description of development approach
For ease of use, compatibility for the imported code has been retained, despite not being an API breaking change.

Documentation of the deprecation has been fixed.
Fixes #15075

Summary of the issue:
Highlight has not been reported when querying formatting manually via script in globalCommands, particularly useful after pr #14610.

Description of user facing changes
If a text is highlighted in Word, now it's reported with NVDA+f, even if highlight reporting is disabled in document formatting settings.

Description of development approach
Simply added "reportHighlight" as config key to query in _reportFormattingHelper, inside globalCommans.py.
Closes #15017 (work-around)

Summary of the issue:
On a specific system (see #15017), Windows cannot get the language name from LCID. This cause an uncaught error preventing the OCR settings panel to be fully created (and the previous panel to be cleared).

Description of user facing changes
Displaying the OCR settings will not fail anymore on some systems where it is not possible to derive the language name from LCID.

Description of development approach
When listing OCR languages, we use languageHandler.getLanguageDescription to determine the name given the language code. However this function may return None in case it cannot find a language name.
This return value had not been taken into account when listing the OCR languages.

Thus this PR allows to add the language code instead of is name in the OCR list as a fallback if the name cannot be found.

A debugWarning is logged in the function languageHandler.getLanguageDescription if the language cannot be found; note that this function is used in some add-ons.

In the settings panel instead, I log an error so that the situations with unknown languages can be captured more easily.
Calling context help in the add-on store while the focus is in "Other details" or on the tabs does not jump to the add-on store paragraph.
Context help on other GUI controls (add-ons list, action button) is not impacted by this issue since they have dedicated help targets.
Description of user facing changes
Context help works correctly in add-on store, i.e. jumps to the correct paragraph.

Description of development approach
Fix the anchor's name according to what is in the user guide.

Testing strategy:
Tested F1 with a portable version created from the snapshot generated by appVeyor (nvda_snapshot_pr15080-28549,7e72e668.exe) when the focus is in tabs, description field or other details.
Fixes #14760
Fixup of #14133

Summary of the issue:
When saving a config spec, validation would be skipped if the string value of the data is unchanged.

This caused various issues including config values not being correctly converted to numbers from strings when validating.
This caused config profiles to fail to load or save correctly.

Description of user facing changes
Fix up of various bugs related to user config

Description of development approach
Perform special handling that was introduced in #14133 for feature flags only
Summary of the issue:
Found two typos in source/locale/en/symbols.dic.

Description of user facing changes
identifier	old	new
∭	tripple	triple
Fixes #15079

Summary of the issue:
Eurobraille devices were not being detected as of #14690

Description of user facing changes
Eurobraille devices should now be detected

Description of development approach
Forcibly include brailleDisplayDrivers.eurobraille in packages like the albatross driver
Link to issue number:
Fixes #15053

Summary of the issue:
Object navigation can be difficult to grasp for some people. It is helpful to assign the flattened object nav gestures (that are now only available on touch screen)by default.

Description of user facing changes
See change log items

Description of development approach
Added gestures to scripts in globalCommands.
Closes #7756.

Summary of the issue:
NVDA does not output ARIA live regions in Braille, making them completely inaccessible in Braille-only usage scenarios.

Description of user facing changes
ARIA live region updates are now displayed as Braille messages, similarly to UIA notification events.

Description of development approach
Call brailleHandler.message on live region updates.
)

Fixes #15098

Summary of the issue:
When announcement of cell coordinates is disabled in NVDA settings, moving focus in a Calc spreadsheet resulted in the coordinates of the previously focused cell to be announced.
This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE event on the previously focused cell before sending an EVENT_OBJECT_FOCUS event for the newly focused cell
(s. https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ). This triggered announcement of the previously focused cell in the LibreOffice app module handling for cell selection changes.

Description of user facing changes
No more announcement of the previosly focused cell when switching focus to another one in LibreOffice Calc and announcement of cell coordinates is disabled in NVDA settings.

Description of development approach
In the LibreOffice app module specific code that handles EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells, only trigger announcement of the selection (or currently focused cell) if a selection actually exists, i.e. the number of selected cells is positive. (Announcement of a focused cell when no selection exists still happens in response to the corresponding event indicating focus change.)
Fixes #15034
Fixes #15077

Summary of the issue:
The store data cache is refreshed every 6 hours. This may not be enough and it's desirable to add a mechanism to refresh it making a small request to the server, so we can request data just when a new commit has been done to the views branch of the nvaccess/addon-datastore repo.

Description of user facing changes
When opening the add-on store, if there has been changes on the server, the cached data should be updated.

Description of development approach
In dataManager, a function has been added to get the cacheHash from NV Access server.
References to date, including parameters of functions, have been replaced with variables which hold the value of the cache hash.
try... except clauses have been used to ensure that .json files which store cache data are valid,though perhaps a jsonschema will be more robust and will allow to control data types.
network.py has been tweaked.
#15103)

Closes #15010
Closes #15011

Summary of the issue:
In add-on store, some accelerator keys are not discoverable nor translatable:

alt+L for the add-on list is hard-coded (thus not modifiable by translators) and is not discoverable, neither visually (no visible label), nor via object navigation on the whole list
alt+O for "Other details" field is not discoverable visually nor with shift+numpad2.
Description of user facing changes
The labels for the list and for "other details" field are made visible and the accelerator key is underlined.
shift+numpad2 allows to report the accelerator key of the field.
Description of development approach
Do not hide anymore the labels of the list and "other details" field
used the same strings for the label of the list and of the tabs; the only difference is that the "&" making a letter an accelerator key is removed when the string is used for the tabs (and for the title).
Used "alt+c" for the "Actions" button to free up "alt+a" for the add-on list label.
Testing strategy:
For "Other details" and for the 4 possible labels of the add-on list:

Visual check
Check that alt+a/alt+o are working, i.e. moving the focus
When tabbing to "Other details" or to empty add-on list, checked that alt+O/alt+A is reported
When in "Other details" or in empty add-on list, shift+numpad2 reports the shortcut key
When moving nav object to the add-on list (not specifically empty), the shortcut key is reported.
Fixes #10018

Summary of the issue:
System administrators may wish to configure NVDA to restrict unauthorized system access.
Secure mode can be forced through the --secure CLI parameter, however, forcing this parameter is not easily done for system administrators.

In a corporate environment where application usage is restricted, NVDA should be forced into secure mode via a registry key parameter, rather than a CLI parameter

Description of user facing changes
Added a registry key parameter to force secure mode of NVDA.

Improved documentation for system administrators on secure mode.

Description of development approach
Added a registry key parameter to force secure mode of NVDA.

make isRunningOnSecureDesktop and isLockScreenModeActive part of public API
Fixes #15091

Summary of the issue:
Pr #14984 broke Excel cell formatting reporting in such a way that it would always report all formatting, regardless of whether the formatting changed between cells.

Description of user facing changes
Ensure that cell formatting isn't repeated needlessly.

Description of development approach
When getting the selection in script_changeSelection, override the parent of the selection with self. This ensures that the format field cache on the work sheet will persist when moving through cells.
Closes #15041

Summary of the issue:
A reference to the add-on store is kept alive after being destroyed.
It is unclear what is causing this.
If a reference is kept alive, handling a new instance causes an error, allowing multiple instances of the add-on store dialog to be opened.

Description of user facing changes
Prevent multiple instances of the add-on store dialog from opening.
Suppress the ERROR level log when an instance is kept alive to debugWarning, and instead handle the "dead" instance more gracefully.

Description of development approach
Improve the initialisation and destruction of the add-on store with the goal of reducing references to the add-on store dialog from being held.
This is not effective at preventing the add-on store dialog reference from staying alive, but may help solve the problem in future.
It is unclear how the dialog instance is remaining alive, and where the reference is being held.

If an instance is being kept alive, instead of throwing an error when starting a new instance, mark the instance as alive and re-use the alive instance.
Add a product vision and guiding principles document. Reference this document from readme.md.
Fixes #14885
Fixes #3166

Summary of the issue:
It has not been possible to move system focus/caret with single routing button press when braille is tethered to review, or when braille is tethered to automatically and follows temporarily review cursor. When user wants to review editable text without affecting system caret position (braille tethered to review continuously or temporarily), it maybe useful if he/she can route caret when needed for example to correct typos. Although thiskinds of routing has been possible, it has required at least one extra routing button press.

Description of user facing changes
A new setting Move system caret when Routing review cursor is added:

Never (Default): No change
Only when tethered automatically: Routing keys will move the caret or focus when tethered automatically. When explicitly tethered to review, routing keys won't move the caret
Always: Regardless whether tethered to review or automatically, routing the review cursor will move the caret or focus
Description of development approach
This pr takes a different approach to #15044.

The logic is not in the routing scripts in globalCommands but instead on the braille.ReviewTextInfoRegion class as well as two new region types for review cursor and objects. First of all, TextInfoRegion.routeTo has been split into two methods. This ensures that we can override the routing behavior for the review cursor regions without touching the BrailleInput logic. Furthermore, the following changes were added/changed:

ReviewNVDAObjectRegion: simply sets focus to the object before executing the default action
ReviewCursorManagerRegion. Inherrits from ReviewTextInfoRegion and CursorManagerRegion to ensure that ReviewTextInfoRegion._routeToTextInfo calls the right super class on cursor managers
ReviewTextInfoRegion: implemented _routeToTextInfo to support the new behavior. It always calls the super class to execute the normal routing action (i.e. moving the review cursor and activating the position). When routing should move the system caret, it calls setFocus on an object when the underlying TextInfo class is DisplayModel, i.e. when in screen review. Otherwise, it calls setCursor on the super class, which translates to moving the system or cursor manager caret.
Fixes #15082

Summary of the issue:
The first utterance after around 10 seconds of silence with a SAPI5 synth is not spoken.

Description of user facing changes
Issue does no longer occur.

Description of development approach
Since #14759 we are modifying some window messages in our process. This includes setting the SMTO_ABORTIFHUNG flag. I was able to pinpoint that setting this flag to a message of type WM_APP caused this particular issue with SAPI5. Therefore I excluded this range of messages (WM_APP through 0xBFFF).
…15122)

Summary of the issue:
Gesture for move system caret when routing review cursor

Description of user facing changes
| Cycle the braille move system caret when routing review cursor states | f1+f3, f9+f11 |
Fixes #14991

Summary of the issue:
There are various bugs with updating add-ons

An externally sourced add-on replacing an add-on store add-on does not correctly flush the add-on store version JSON cache. This causes the outdated add-on version information to be used by the externally installed add-on.
Updating an add-on through via the store does not correctly reflect the state: this allows an add-on to be updated multiple times. Instead the "download, pending install" state must be tracked better.
Updating an add-on externally does not correctly reflect the state: instead "pending removal" is shown, instead of pending install.
Updating an add-on externally is not handled correctly, causing the updated add-on to never be installed correctly
Updating an add-on through the store is not handled correctly, the new bundle should be installed before the previous bundle is marked for removal. This allows the add-on to run install/uninstall tasks in an expected way
Description of user facing changes
Fix various bugs with updating an add-on

Description of development approach
match the addonHandler installation / removal order when updating an add-on through the add-on store
check download status when determining state
Reflect "pending install" rather than "pending removal" for add-ons being updated.
include downloaded, pending installs in the installed add-ons tab
ensure add-ons are detected correctly when removing pending installs
…15097)

Fixes #14913.

Summary of the issue:
On some systems, when WASAPI is enabled, the system won't automatically go to sleep, even though it goes to sleep fine when WASAPI is disabled.

Description of user facing changes
When WASAPI audio is enabled, the computer now automatically goes to sleep if appropriate.

Description of development approach
When a WASAPI stream isn't stopped, this unfortunately prevents some systems from going to sleep automatically. I think this is on Windows 10 and earlier, but the precise details aren't clear. According to a Microsoft engineer, this is by design.

I originally thought this occurred when a WASAPI stream remained open. However, some testing revealed that stopping the stream seems to be enough to fix this. Previously, we didn't explicitly stop idle streams. Stopping is better than closing because opening a stream after it is closed can introduce delays or truncated audio.

Specific implementation details:

Add a method to stop a WASAPI stream when it is idle.
When feed() is called, track the current time as the last time the stream was definitely active. If there isn't a pending stream idle check, schedule one.
Every 5 seconds, check if there are any playing streams that haven't been active for 10 seconds. If there are any, stop them.
We use a class-wide check to avoid continually resetting timers on every audio chunk. See the docstring for WasapiWavePlayer._idleCheck for details.
Part of #14973

Summary of the issue:
Installed add-ons do not have their display name and description localised, even if localised manifests exist for the installed add-on.

Description of user facing changes
Reinstate localisation for installed add-ons of the display name and description

Description of development approach
Fetch translated strings from the localised manifests

Testing strategy:
Ensure add-on with localisations is correctly displayed in the installed add-ons tab of the store.
Available and updatable add-ons rely on the strings to be translated when fetching from the store.
Summary of the issue:
The add-on store cache for an installed addon should be deleted in the following scenarios:

when removing an add-on
when installing an external version of an add-on
This was not reflected correctly in the code

Additionally, external add-ons were incorrectly grouped as stable add-ons in some cases

Description of user facing changes
Fix bug where add-on store cache would be incorrectly deleted or incorrectly retained in various scenarios.

Description of development approach
Delete add-on cache file when removing or updating an add-on from an external source.
Closes #15106

Summary of the issue:
If NVDA has an invalid add-on store cache file it can be safely deleted until a new cache is fetched.
Without deleting it, NVDA will start with an error until it is overwritten by browsing add-ons.

Description of user facing changes
If NVDA has invalid cache data for the add-on store, NVDA will log an exception then delete the invalid cache file.

Description of development approach
If NVDA has invalid cache data for the add-on store, NVDA will log an exception then delete the invalid cache file.
seanbudd and others added 8 commits July 14, 2023 17:12
)

Fixes #15096

Summary of the issue:
When an active profile has the synthesizer set to silence, and a user switches profiles to a synthesizer which fails to load, NVDA fails back to the silence synthesizer.

This is because the default behaviour on failure is to roll back to the previous synthesizer, which is appropriate except for silence.

As this is an attempt to change from silence to speech, instead NVDA should fallback to the next synthesizer, rather than the previous synthesizer.

Description of user facing changes
NVDA falls back to the silence synthesizer when:

a user is using the silence synthesizer,
and attempts to switch synthesizers e.g. via a profile change
and the synthesizer fails to load
Description of development approach
ensure the previous synthesizer we are switching back to is not silence.
Instead, the synth will switch to the next one, which may eventually reach silence if subsequent synthesizers fail to load.
Fixes #15096

Summary of the issue:
When an active profile has the synthesizer set to silence, and a user switches profiles to a synthesizer which fails to load, NVDA fails back to the silence synthesizer.

This is because the default behaviour on failure is to roll back to the previous synthesizer, which is appropriate except for silence.

As this is an attempt to change from silence to speech, instead NVDA should fallback to the next synthesizer, rather than the previous synthesizer.

Description of user facing changes
NVDA falls back to the silence synthesizer when:

a user is using the silence synthesizer,
and attempts to switch synthesizers e.g. via a profile change
and the synthesizer fails to load
Description of development approach
ensure the previous synthesizer we are switching back to is not silence.
Instead, the synth will switch to the next one, which may eventually reach silence if subsequent synthesizers fail to load.
… check. (#15145)

Fixes #15143.

Summary of the issue:
When playing the start sound, NVDA can fail with this error:

  File "nvwave.pyc", line 975, in _scheduleIdleCheck
  File "core.pyc", line 928, in callLater
core.NVDANotInitializedError: Cannot schedule callable, wx.App is not initialized
Description of user facing changes
Fixed the error.

Description of development approach
Feeding WASAPI audio schedules an idle check, which uses core.callLater. That will fail if the wx.App isn't initialised yet.

We now just catch this and ignore it. playWaveFile closes the stream after playing anyway, so this first idle check isn't important.
…or passthrough on init (#15136)

Fixes #15131
Fixes #10612

Summary of the issue:
Recent changes to Excel support caused an issue where selection in the Excel cell edit control didn't work. When fixing that, I discovered another issue where initializing the Excel tree interceptor set the passThrough auto property to True, resulting into vision and braille focus set to the previous focus object.

Description of user facing changes
Selection works again in cell edit controls
When leaving a cell edit control, the name of the sheet is announced again, similar when coming from the formula bar.
When an excel cell gets focus from outside, focus is no longer needlessly set to the previous focus object.
Description of development approach
This is another case of an issue that was obfuscated before #14984. There is a workaround in the Excel appModule to fallback on the UIA edit control if the edit control that gets focus when pressing f2 reports as unknown. However, the parent of the UIA control was set to the excel cell, not to the parent of the Excel6 window. This means that the changeSelection script still propagated, i.e. for every selection change related gesture in the cell edit control, NVDA would check whether a new cell was focused.
I changed the app module to set the parent of the UIA cell edit to the parent of the Excel6 window. This has the side effect of the sheet name being reported after leaving the edit control because the sheet receives focus again. This is however consistent with behavior prior to the app module workaround was applied, i.e. the time when we relied on the displayText to report the contents.
After I applied this change, I discovered that leaving the edit cell raised a COMError on an UIA object. This turned out to be an issue like this:

api.setFocusObject was called for the new focus object (i.e. the worksheet)
A new tree interceptor was created for the work sheet
In the init method of the tree interceptor, self.passThrough was set, which is an auto property calling _set_passThrough on the tree interceptor.
_set_passThrough called braille.handler.handleGainFocus and vision.handler.handleGainFocus for the current focus object, which was still the previous focus object (i.e. api.setFocusObject was not yet updated to the new focus).
a COMError was raised because the UIA cell edit element was no longer available.
I fixed this by setting _passThrough instead, which sets the internal _passThrough boolean without applying the logic that updates focus for vision and braille, which is really not necessary and even harmful to do in init of a tree interceptor. I therefore applied the same change to another incarnation of this issue in the MSHTML virtual buffer.
#15152)

Closes #14973

Summary of the issue:
Add-ons installed from the add-on store used the untranslated add-on store JSON strings.
As of #15137, only add-ons that were installed from an external source had translated strings.

Description of user facing changes
Add-ons installed from the add-on store will have translated strings.

Description of development approach
Create a separate model for add-ons fetched from the add-on store, and add-ons cached after being installed from the add-on store.
Data fetched from the add-on store should be translated. Installed cached data for an add-on will be whatever language is used when the fetched add-on store data is cached. As such, we should defer to the translated manifests for installed add-ons.
Follow up to #15121

Fixes #15142
Fixes #15141
Fixes #15148
Fixes #15147

Summary of the issue:
PR #15121 to fix #15120 had various unexpected side effects.
This is due to symbols that were previously star imported into gui/__init__.py being removed.
Add-ons and the vision enhancements core module relied on these symbols being imported.
While there was no API breaking changes, these changes affected over 30 add-ons

Description of user facing changes
Fix up issue with vision enhancement providers, such as opening the relevant settings panels.

Description of development approach
Add aliases for SettingsPanel, AutoSettingsMixin, _popupSettingsDialog in gui
Closes #15127
Fix up of #14021

Summary of the issue:
#14021 accidentally overwrote the touch gesture to move to the previous line in text review mode.
These overwritten gestures were not documented in the user guide, and appear to be unintentional.

Description of user facing changes
Remove overwritten "flickUp" gestures.

Description of development approach
Remove overwritten "flickUp" gestures.
Raised in #14912 (comment)

Summary of the issue:
A user may wish to discover the internal ID of an add-on.
For an add-on installed from the datastore, both publisher and author fields can be displayed.

Description of user facing changes
Display the add-on ID in the details panel.
Show the "author" field for add-ons installed from the datastore.
@seanbudd seanbudd requested review from a team as code owners July 24, 2023 02:47
@seanbudd seanbudd requested review from Qchristensen and michaelDCurran and removed request for a team July 24, 2023 02:47
@seanbudd seanbudd merged commit 61704ff into beta Jul 24, 2023
@seanbudd seanbudd changed the title Merge master to beta Final master to beta merge for 2023.2 Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.