Attach UiaRenderer and Fire Selection Changed Events#2989
Attach UiaRenderer and Fire Selection Changed Events#2989carlos-zamora merged 21 commits intomasterfrom
Conversation
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
feb0c5c to
a36902f
Compare
zadjii-msft
left a comment
There was a problem hiding this comment.
I have lots of comments/questions, but considering I'll be gone in 3 days, I don't want to block the PR
|
Whoops. That last commit was intended for the other branch... but eh. It's all going to the same place anyways. |
393d9b9 to
c1f10c3
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
zadjii-msft
left a comment
There was a problem hiding this comment.
I'm marking as changes requested to make sure the _prevSelection thing gets followed up on. I'm open to being overruled on the SignalUia thing.
zadjii-msft
left a comment
There was a problem hiding this comment.
None of this is worth blocking over, but I don't know if these are serious concerns or not.
miniksa
left a comment
There was a problem hiding this comment.
There's still a few things outstanding, so I don't want to sign off yet.
|
🎉 Handy links: |
Summary of the Pull Request
I recommend looking at this PR by commit.
This PR makes use of the UiaRenderer by attaching it to the TerminalControl and setting up selectionChanged events for accessibility.
References
#2447
PR Checklist
Tests added/passedRequires documentation to be updatedDetailed Description of the Pull Request / Additional comments
Commit 1: attaching the UiaRenderer
The
uiaRendereris treated very similarly to thedxRenderer. We have a unique_ptr ref to it in theTermControl. This gets populated when theTermControlAutomationPeeris created (thus enabling accessibility).To prevent every TermControl from sending signals simultaneously, we specifically only enable whichever one is in an active pane.
The
UiaRendererneeds to send encoded events to the automation provider (in this case,TermControlAutomationPeer). We needed our own automation events so that we can reuse this model for ConHost. This is the purpose ofIUiaEventDispatcher.We need a dispatcher for the
UiaRenderer. Otherwise, we would do a lot of work to find out when to fire an event, but we wouldn't have a way of doing that.Commit 2: hooking up selection events
This provides a little bit of polish to hooking it up before. Primarily to actually make it work. This includes returning
S_FALSEinstead ofE_NOTIMPL.The main thing here really is just how to detect if a selection has changed. This also shows how clean adding more events will be in the future!
Validation Steps Performed
Scenario 1: cell selection
click on a cell with text in it
Narrator should read it out
Scenario 2a: expand selection
Click on a cell with text in it and drag it over more text (extending the selection)
Narrator shouild read the first cell, then read either...
(this is still unclear to me when it does which one)
Scenario 2b: reduce selection
Make a selection of an entire word (i.e.: "Powershell")
Reduce the selection to the first character
Narrator should read what got unselected
Scenario 3: Double click
double click on a word
Narrator should read the entire selection
Scenario 4: Triple click
Triple click on a line
Narrator should read the entire selection