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
Fix issues with script propagation in Excel as well as tree interceptor passthrough on init #15136
Conversation
This PR is currently set to close all 3 issues when merged. Would creating a try-build help confirm that this PR closes all 3 issues? |
Hi, After my testing #15131 can be fixed by this PR. Thanks |
See test results for failed build of commit 30e005b84b |
The current CI build is failing, can you try to rebuild a version? |
The failure is unrelated, the downloadable build should still work |
Thanks @LeonarddeR for the work on this one.
|
This issue is strictly spoken unrelated. It probably has to do with UIA being forcefully disabled in Excel, causing text change events not coming through. Though I can't reproduce when selective registration is off. |
Link to issue number:
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
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:
self.passThrough
was set, which is an auto property calling _set_passThrough on the tree interceptor.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.
Testing strategy:
STR from #15131. I'd like to encourage people to test #14799 and #10612 as well since I have good hope that those are fixed as well.
Known issues with pull request:
When leaving a cell edit control, the name of the sheet is announced again, similar when coming from the formula bar.
Change log entries:
Bug fixes
Code Review Checklist: