Skip to content

Make ScreenInfoUiaProvider::GetVisibleRanges() Return Only One Range#4526

Merged
1 commit merged intodev/cazamor/uia-tracingfrom
dev/cazamor/acc/get-visible-ranges
Feb 11, 2020
Merged

Make ScreenInfoUiaProvider::GetVisibleRanges() Return Only One Range#4526
1 commit merged intodev/cazamor/uia-tracingfrom
dev/cazamor/acc/get-visible-ranges

Conversation

@carlos-zamora
Copy link
Member

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

Validation Steps Performed

Verified using Accessibility Insights.

@carlos-zamora carlos-zamora added Product-Conhost For issues in the Console codebase Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. labels Feb 11, 2020
@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Feb 11, 2020
@ghost ghost requested review from leonMSFT, miniksa and zadjii-msft February 11, 2020 18:20
@miniksa miniksa added AutoMerge Marked for automatic merge by the bot when requirements are met and removed Needs-Second It's a PR that needs another sign-off labels Feb 11, 2020
@ghost
Copy link

ghost commented Feb 11, 2020

Hello @miniksa!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit be125b4 into dev/cazamor/uia-tracing Feb 11, 2020
@ghost ghost deleted the dev/cazamor/acc/get-visible-ranges branch February 11, 2020 21:59
ghost pushed a commit that referenced this pull request Feb 20, 2020
## 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:
* Make GetVisibleRanges() return one range (and add tracing for it).
`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 #1914. Closes #4507.
* [x] CLA signed

## 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 trace `UiaTextRange`, whereas `TextProvider` is used to trace `ScreenInfoUiaProviderBase`.

`_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.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Accessibility Issues related to accessibility AutoMerge Marked for automatic merge by the bot when requirements are met Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants