-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
UIA: Fix GetVisibleRanges() and add Tracing #4495
Conversation
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 don't totally understand: it makes the tracing compile, but it doesn't actually enable many of the commented-out traces?
sorry, i was just looking at one commit. re-reviewing. |
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.
okay, minor bits.
…4526) ## Summary of the Pull Request `ScreenInfoUiaProvider::GetVisibleRanges()` used to return one range per line of visible text. The documentation for this function says that we should return one per contiguous span of text. Since all of the text in the TermControl will always be contiguous (at least by our standards), we should only ever be returning one range. ## PR Checklist * [X] Closes #4507 * [X] CLA signed. ## Validation Steps Performed Verified using Accessibility Insights.
oop this one got another PR merged into it |
I've updated the PR description to include the GetVisibleRanges change. |
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
* Bring over ConsoleUIATextInfo refactoring from #10716. * Add WinTerminalUIA * Style. * Review actions. * microsoft/terminal#4495: support fixed GetVisibleRanges. * KeyboardHandlerBasedTypedCharSupport -> EnhancedTermTypedCharSupport, add _shouldUseToUnicodeEx flag and set False for WinTerminalUIA. * Update doc comments. * Update copyrights. * Review actions. * Factor out bounding into separate method. * Re-introduce KeyboardHandlerBasedTypedCharSupport. * Fix UIA console support for newer Windows Console builds. * Revert copyright header changes. * Revert another no longer necessary copyright header change. * Fix comments. * Update docstring. * Review actions. * Update source/NVDAObjects/behaviors.py Co-Authored-By: Leonard de Ruijter <[email protected]> * Add class docstring. * Optimization: clear character buffers when reporting new lines. This saves us from scanning the old and new lines twice in _calculateNewText (once for diffing and once for finding nonblank indices), and fixes typed word reporting for 21H1 console. This new approach does not resolve #10942. * Update inaccurate information in user guide. Co-authored-by: Leonard de Ruijter <[email protected]>
Summary of the Pull Request
Debugging our custom UIA providers has been a painful experience because outputting content to VS may result in UIA Clients getting impatient and giving up on extracting data.
Adding tracing allows us to debug these providers without getting in the way of reproducing a bug. This will help immensely with developing accessibility features on Windows Terminal and Console.
This pull request additionally contains payload from #4526:
ScreenInfoUiaProvider::GetVisibleRanges()
used to return one range per line of visible text. The documentation for this function says that we should return one per contiguous span of text. Since all of the text in the TermControl will always be contiguous (at least by our standards), we should only ever be returning one range.PR Checklist
Detailed Description of the Pull Request / Additional comments
UiaTracing
is a singleton class that is in charge of registration for trace logging.TextRange
is used to traceUiaTextRange
, whereasTextProvider
is used to traceScreenInfoUiaProviderBase
._getValue()
is overloaded to transform complex objects and enums into a string for logging._getTextValue()
had to be added to be able to trace the text a UiaTextRange included. This makes following UiaTextRanges much simpler.Validation Steps Performed
Performed a few operations when under NVDA/Narrator and manually checked the results.