-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Constrain a11y word nav to the virtual bottom #5405
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 think this will break anything. Virtual bottom should always be below the last written text so this should always work
Thanks @carlos-zamora! |
634034a
to
78ebaca
Compare
src/host/renderData.cpp
Outdated
Viewport bufferSize = gci.GetActiveOutputBuffer().GetBufferSize(); | ||
COORD endPosition{ bufferSize.Width() - 1, bufferSize.BottomInclusive() }; | ||
const auto mutableViewport = gci.GetActiveOutputBuffer().GetVirtualViewport(); | ||
COORD endPosition{ mutableViewport.Width() - 1, mutableViewport.BottomInclusive() }; |
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.
just so i understand: this is not impacted by the user having scrolled up? the viewport usually is.
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.
So the good news is that the returned value is not impacted by the user having scrolled up. The bad news is, your comment led me down a rabbit hole of realizing that #6453 exists. This was already in master though.
Any updates on this PR? Thanks. |
I came by to look at this but three things stick out:
So I'm going to skip reviewing it for now and come back later hoping some of those progress. |
Do you intend to merge this in time for 21H1? It would mean a lot for NVDA. Thanks! |
@codeofdusk Yeah! I've had bad luck the last few days where suddenly my internet goes down or my machine refuses to run the tracing app haha. I'm hoping to get this in this week or early next, but I'm trying to prioritize closing some of the other Windows Terminal bugs first. |
@codeofdusk sorry about the confusion here: the 21H1 milestone end date was set incorrectly. Things are a lot less dire than “we need to fix all the UIA bugs in the next two days.” |
Excellent news! |
@carlos-zamora Any updates on this PR? Were you able to address the issues with your machine and outstanding review comments? Thanks! |
Now that Build is over, time to get back to this one 😊. Getting the traces and fixing the build today. |
And another problem came up with recording the traces. Baby steps. This'll get done soon, sorry Bill haha. |
Thanks for looking into it! Also, could you please look into #5481? |
@codeofdusk We'll look into it -- Carlos is assigned, but that does not indicate that it's in his immediate list of things to look at. We're finally coming off the v1 release cycle for Terminal and will have time in the future to evaluate conhost issues. |
78ebaca
to
76fcc51
Compare
What is the current status of this PR? |
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.
This seems to have shaped up into something like we wanted it to. Can you change the name to something like "constrain a11y to the touched viewport"
consider that SEARCH uses this function (!) which could be problematic.
Also, how does this PR relate to #6986? |
Here, we're making it easier to find the last non-space character (and the last word, by extension). #6986 is an architectural change to treat the last non-space character as the end of the buffer. This change should make it a bit easier to accomplish that in a performant way. |
Closing. See #7000 (comment) for more details. I'll revive this PR once I actively start working on UIA again. |
Use the virtual bottom in ConHost to speed up a11y word navigation performance.
GetTextBufferEndPosition()
is also used by by search; it'll also get a minor performance boost.PR Checklist
Detailed Description of the Pull Request / Additional comments
#7789 uses
GetLastNonspaceCharacter()
to determine where the last word is and exit early on aUIA::Move
by word call. The change in this PR passes the virtual bottom over toGetLastNonspaceCharacter()
to make that search a bit faster.Tested word navigation on Host.exe using NVDA.
WPR Traces
The percentages below represent the weight that a function call had. The
test scenario included moving by word on the CMD welcome message until
the last word was reached. Inspect.exe was used to limit any additional
calls that are generally performed by a screen reader.
UIA:Move
There is an improvement of about 1% in a release build of ConHost.