Windows 10 Calculator: resolve expression entry repetitions#9429
Conversation
|
Hi, Will plan to experiment with it (likely tonight provided my health permits). Thanks for reminding me about that flag. |
|
Hi, Regarding script decorator issue, I'm thinking it has to do with name mangling. Overall work: I'm willing to delay this work until Python 3 comes to NVDA. Doing so could also give me more time to experiment with things here and there. Thanks. |
|
Hi, Regarding live region change event: after looking at the UIA live region flag and my own code, it might be possible, but we run into an important design limitation: when @michaelDCurran designed live region change handling for UIA objects in 2017 (with revisions afterwards), it was intended that all live regions will be announced, provided that texts are different and there is a reasonable time interval between event firings. Part of the reason for writing that function in the Calculator app module was to detect which regions should be announced, because it isn't quite possible to name all live region descriptors in one go and lump them into an overlay class. Perhaps the newly opened Calculator will change that, but that'll take months to hunt and fix. Besides, detecting live regions and defining the regions to be silenced will introduce code duplication like so:
Both will describe the same thing. Resolving the underlying issue that causes this code duplication will involve opening up other possibilities to silence live regions. Thanks. |
|
Hi, If talking about the result, it isn't necessarily a focused object because it'll be announced as soon as enter key is pressed to finalize the expression. Thanks. |
…ess#9428. Calculator raises UIA notification event (live region change event in older releases and in some screens) to communication progress and results of calculations. However, this results in repetitoins if typed character announcement is turned on. Thus, as part of this new app module, suppress repetitive announcements if possible.
… 10 App Essentials (accidentally committed, now gone).
a6f9aff to
b9804da
Compare
|
Hi, Update: after doing more tests, it appears @LeonarddeR's intuition was correct - disabling live region announcement will do. But first, I'll let people test possible changes via my add-on before editing the pull request. Thanks. |
In the old days of Calculator, live regions were used from various places, including calculator expressions, unit conversion and other places. Now that uIA notification event and some name change events will take care of this, remove live region change event support code (and also becasue NVDA itself will announce live regions if possible).
…e to UI changes in 2019.
|
Hi, Two things:
Thanks. |
|
Hi, Actually, ET128. |
lint results include splitting each part of a conditional, spaces between assignment operator, and block comments.
|
Hi, Calculator has gone through yet another UI redesign, this time due to "always on" i.e. picture-in-picture mode support. The redesign also rearranges the UIA tree, which breaks this PR and the app module that ships with Windows 10 App Essentials. I'll prepare a fix after testing this week's Insider Preview build (if any). Thanks. |
…uld not allow NVDA to repeatedly announce calculation results or expressions. Re nvaccess#9428. With the advent of alwasy on top i.e. compact overlay mode in Calculator, additional UIA automation ID's were added for calculation results and expressions in overlay mode. Because of ine length concerns, the additional ID's, together with the existing ones, are now housed inside a list of known ID's causing NVDA to announce expressions repeatedly. Not only this makes it easy to add more ID's in the future (either through NVDA Core or add-ons), it improves readability for name change and notification event handler methods (and keeps the lines short).
In August 2019, Calculator app (preview) added always on top mode. As the name suggests, this puts standard calculator on top of other windows. Because of this, UIA tree has been changed, so work with old and new tree structure.
|
To @LeonarddeR: ready for another round of review, if you are willing. Thanks, |
…ms that should not be announced. Re nvaccess#9428.
|
Hi, Update: since the last time we talked, graphing mode has been added to Calculator, but supporting that is beyond the scope of this PR. Giving this PR a bit of break due to backlog (otherwise ready for review). Thanks. |
|
Hi, Update: it turns out the solution is simpler than I thought: rather than adding individual UIA notification activity ID's, we can just take care of one or two corner cases (DisplayUpdate ID should not be announced unless noted otherwise). This is thanks to the fact that Calculator app source code is hosted on GitHub (MIT license), so we now know the full list of activity ID's. Thanks. |
…ty ID. Display updated activity ID should be ignored unless needed, as it causes repetitions when entering calculations while speak typed characters is on.
|
@josephsl There are a number of remaining review actions on this PR. Please can you check them out comment / resolve / make changes as appropriate. Then we can move onto a second review. |
|
Hi, Addressed in subsequent commits - will mark them as such. Thanks for the reminder. |
|
@LeonarddeR since you reviewed this previously, and the feedback has now all been addressed, could you please review this again. |
LeonarddeR
left a comment
There was a problem hiding this comment.
@feerrenrut sorry for missing the request for review.
|
Hi, note that notification event is fired when working with graphing calculator mode, but given the projection that it won’t be used a lot, I’m not going to revise this PR for sake of that. Windows 10 App Essentials add-on version will continue to include experimental support for graphing calculator UI for now until it is ready for Core at a later date. Thanks.
|
|
Hi, Two issues found, to be resolved in a PR (coming today):
Thanks. |
Link to issue number:
Fixes #9428
Summary of the issue:
Calculator raises UIA notification event (live region change event in older releases and in some screens) to communicate progress and results of calculations. However, this results in repetitions if typed character announcement is turned on. Thus, as part of this new app module, suppress repetitive announcements if possible.
Description of how this pull request fixes the issue:
This new app module performs the following:
Testing performed:
Tested with Windows 10 App Essentials implementation (identical to this pull request).
Known issues with pull request:
None
Change log entry:
Bug fixes: In Windows 10 Calculator, NVDA will not announce progress of calculations if speak typed characters is disabled. (#9428)
Additional notes:
Because Windows 10 Calculator is open-source now, changes from inside and outside Microsoft will impact NVDA's support for this app, thus at least one person must be in charge of updating the app module for this app on a regular basis. Also, the new app module is a donation from Windows 10 App Essentials add-on, so it went through years of testing and real-life experiences.
Thanks.