microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.31k stars 8.28k forks source link

Add a means by which UIA clients can determine whether a build of Windows Terminal does or doesn't support notifications #13601

Open codeofdusk opened 2 years ago

codeofdusk commented 2 years ago

Description of the new feature/enhancement

12358 adds support for UIA notifications, allowing screen readers and other UIA clients to easily determine exactly what new text to report without doing any of the heavy lifting themselves (diffing, etc..). However, as not all terminals support notifications, UIA clients need a way to determine when this support is available and when they should fall back to performing diffing themseles. (if clients diff even when notifications are available, we risk doing extra work and/or double-reporting incoming text).

Proposed technical implementation details (optional)

codeofdusk commented 2 years ago

Blocking nvaccess/nvda#13781.

CC @carlos-zamora, @leonardder.

LeonarddeR commented 2 years ago

It could also be considered to add an automationID (it is currently empty)

codeofdusk commented 2 years ago

It could also be considered to add an automationID (it is currently empty)

@leonardder That idea was rejected during initial implementation.

carlos-zamora commented 2 years ago

Chatted with @codeofdusk. This is a feature/task. We'll chat more about it at sync but the short version is this:

zadjii-msft commented 2 years ago

discussion: sure let's do it

carlos-zamora commented 2 years ago

@codeofdusk here's an idea actually. So, all versions of Windows Terminal in active support going back to v1.12 send notifications. At this point, why not just assume that if NVDA is connected to Windows Terminal, it has support for notifications?

The key part here is "connected to Windows Terminal" because Conhost won't support notifications. So if the class name is TermControl, you know you're connected to Windows Terminal, and by extension, you know we support notifications.

CC @DHowett

DHowett commented 2 years ago

Conhost won't support notifications

Until SV2

carlos-zamora commented 2 years ago

Conhost won't support notifications

Until SV2

Nah. Conhost doesn't use the UiaRenderer. So the whole notifications thing doesn't affect Conhost. It operates the same way it always has (I believe it's attached to the Write API but don't quote me on that one, I'd have to look into it).