Feature Request: Fix Accessibility BoundingRects for TextRanges #2942

Closed
opened 2026-01-30 23:09:23 +00:00 by claunia · 1 comment
Owner

Originally created by @carlos-zamora on GitHub (Jul 25, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Summary of the new feature/enhancement

Thanks to #2083, we now have BoundingRects for text ranges. We can modify them and explore the text buffer properly.

Just one little problem...
image

The BoundingRects aren't actually on the text ranges properly. They update and function correctly, but they should look something like how they do in ConHost:
image

Proposed technical implementation details (optional)

There's a few places in UiaTextRange that use ScreenToClient() and ClientToScreen(); We can use them in ConHost because we have an HWND. Unfortunately, Windows Terminal doesn't have access to an HWND (and it seems like that'll be really hard to do).

XAML, on the other hand, should already know some information about bounding rects. That's how we got the one around the TermControl to appear and all of the other XAML elements.

We need to investigate if/how we can leverage XAML's knowledge of screen bounding rects and just pass them along to the UiaTextRange.

Originally created by @carlos-zamora on GitHub (Jul 25, 2019). Originally assigned to: @carlos-zamora on GitHub. # Summary of the new feature/enhancement Thanks to #2083, we now have BoundingRects for text ranges. We can modify them and explore the text buffer properly. Just one little problem... ![image](https://user-images.githubusercontent.com/11050425/61896035-e9c1df80-aec8-11e9-8578-16d14adb91bb.png) The BoundingRects aren't actually on the text ranges properly. They update and function correctly, but they should look something like how they do in ConHost: ![image](https://user-images.githubusercontent.com/11050425/61896134-28579a00-aec9-11e9-8ff7-99552e54fa9c.png) # Proposed technical implementation details (optional) There's a few places in UiaTextRange that use `ScreenToClient()` and `ClientToScreen();` We can use them in ConHost because we have an HWND. Unfortunately, Windows Terminal doesn't have access to an HWND (and it seems like that'll be really hard to do). XAML, on the other hand, should already know some information about bounding rects. That's how we got the one around the TermControl to appear and all of the other XAML elements. We need to investigate if/how we can leverage XAML's knowledge of screen bounding rects and just pass them along to the UiaTextRange.
Author
Owner

@ghost commented on GitHub (Aug 27, 2019):

:tada:This issue was addressed in #2423, which has now been successfully released as Windows Terminal Preview v0.4.2382.0.🎉

Handy links:

@ghost commented on GitHub (Aug 27, 2019): :tada:This issue was addressed in #2423, which has now been successfully released as `Windows Terminal Preview v0.4.2382.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.4.2382.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2942