-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
Use auto select detection for UIA when listening for TextChanged and TextSelectionChanged events #9660
Conversation
…TextSelectionChanged events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
One additional bug fix: address omnibar in EdgeHTML-based Edge is announced correctly if there are suggestions.
Two things observed when testing it with Edge:
- In GitHub edit fields, typed text is announced despite my setting to turn typed characters/words off.
- On some websites (such as Google), selection isn't announced if I use focus mode inside an edit field and attempt to select text.
Tested with PR-9660 binary build from Appveyor.
Thanks.
…o ignore them if appropriate
Thanks for pointing me at these, both should be fixed by now. I need to do some additional testing in Edge in the without autoselect detection.
What bug were you referring to about the omnibar?
|
Hi, until now omnibar content wasn’t announced at all – I wrote a workaround in my add-on which someone helped test and was found to be working. I used similar principle in there, but this PR should do the trick too. I’ll do some more tests with Excel and Outlook in just a moment. Thanks.
|
Hi, EdgeHTML-based Edge issues are fixed. It breaks in Excel, however:
Expected: selected character/word/line, etc. are announced. Tested on Excel 365. Thanks. |
Thanks for reporting again, could be related to my last pr disabling several additional win events for UIA. I will investigate further next week.
|
Test notes for UIA consoles: Windows 10 1803: Windows 10 1903:
|
@josephsl: I couldn't reproduce your issue with Excel with Excel 2016. I tested from source, commenting out the version check from _UIAHandler. Made sure that WithAutoSelectDetection is on the dynamic class of the edit box. Both the formulla bar and the in cell edit field work as expected. |
@codeofdusk: I've only looked quickly at this, but it looks like the autoselect detection code triggers on this because even though nothing is selected and the text range seems to be collapsed, isCollapsed on the selection returns False. |
@codeofdusk: No matter what I do, collapsing a text info for UIA consoles on Windows 10 1903 keeps returning False for isCollapsed. Really looks like there's something severely broken in there. |
@leonardder commented on 3 Jun 2019, 07:20 CEST:
Could reproduce it in Excel 365. The reason is that the edit window is of window class Excel7, and that class is in badUIAWindowClassNames, so events for that class are forcefully ignored. |
Hi, Excel: works. Thanks. |
@michaelDCurran: I really would like to know what you think about this. |
There are definitely issues with the way Microsoft has implemented UIA textRanges for consoles. Specifically:
|
I don't think that there are much benefits, apart from selection being reported when performed with the mouse There is also #9660 (comment) where @codeofdusk noted massive performance changes, but it looks like we have to disregard these. |
Conflicts: source/_UIAHandler.py
@feerrenrut: Just wanted to point out that from a user's perspective, I think this one is important to have in 2019.3. It will also benefit from a long testing period. |
@codeofdusk: how is this now behaving with regard to your console work? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be best to hold off until 2019.3 due to vast changes needed. I did run into editable field issues in Start menu and such, but no need to worry, as these problems are seen with Windows 10 App Essentials enabled (I'll write a fix for it from my add-on once this PR comes to NVDA Core proper). Thanks.
Initial testing looks quite promising (no longer says "selected" repeatedly when typing on Windows 10 1903)! |
@feerrenrut; This pr fixes issues related to braille and UIA. It also needs some wider testing before going into an official release. Therefore if you could give this some attention in the near future that would be awesome! |
PR introduces Flake8 errors 😲 See test results for Failed build of commit dd9ed2dd7c |
@feerrenrut: The linter raises the following warning for _UIAHandler:
I can explicitly import it, but I'm afraid this will make _UIAHandler pretty messy in the end. Therefore I have the feeling that we should exclude this warning. For new modules, warning F403 will still trigger. |
There is also the following issue for the following code:
If the line has 2 tabs at the start, the warning is: |
PR introduces Flake8 errors 😲 See test results for Failed build of commit 855139b269 |
Error F405 I believe is quite valuable.
I'm looking into the indentation error. |
I'm not sure what is causing E121, note that this should be emitted, E121 is supposed to be replaced by ET121 from Flake8-tabs. I can't reproduce it with a minimal test file. So that the closing brace does not need to be moved when adding a new item, to make it easier to see that the brackets match, and indentation levels are correct, I would prefer the following style:
|
Ah, I think I made a mistake with the config. I don't think we want |
Or maybe we do, but need to ignore E121 and any others similar.... |
What is it supposed to do?
|
flake8-tabs replaces many, but not all of pycodestyle indent checks. When you enable flake8-tabs it disables the pycodestyle indent checks, this allows you to re-enable them. However, then some of them are contradictory to the flake8-tabs checks and should be manually disabled. I think we want some of them, but not all. I am looking at them now, and will update #10020 when I work out a good combination. |
To @LeonarddeR: any plans for dealing with linting? Thanks. |
You might also wish to test how the latest changes affect UIA consoles and if selection is reported more consistently. |
I somehow thought that this was already merged. Should have been a dream. |
I fixed linting issues by applying a suggestion from @michaelDCurran from #10110 (comment) |
Link to issue number:
Fixes #9749
Fixes #7554
Summary of the issue:
When editing in Excel, braille doesn't always follow correctly. This also happens in other UIA text fields, such as the search field in Win 10 settings.
Suggestions aren't read in the non-chromium Microsoft Edge address bar.
As of pr #9614, on Windows 10, UIA TextChanged events are once again received by NVDA. They were once disabled in 9025c04. As part of this commit, we switched from the NVDAObjects.behaviors.EditableTextWithAutoSelectDetection ovrlay to the EditableTextWithoutAutoSelectDetection overlay for UIA. This was a necessary step, as text change and selection change events were no longer received from UIA.
Description of how this pull request fixes the issue:
We are already listening for TextChange events. This pr also requests TextSelectionChange events as before 9025c04. A, but only for Windows 10. When on Windows 10, UIA text controls now use the EditableTextWithAutoSelectDetection overlay.
Testing performed:
Known issues with pull request:
None
Change log entry:
It is probably a bit difficult to come up with an entry that is understandable by end users.
Changes
Bug fixes