Skip to content
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

[A11y] Treat last character as 'end of buffer' #10516

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Jun 25, 2021

Summary of the Pull Request

Updates our UiaTextRange to treat the last legible character as the end of the buffer. Doing so significantly improves performance of word navigation because screen readers no longer have to take into account the whitespace following the end of the prompt.

This also fixes #7960. This bug was caused by the UiaTextRange occasionally having its _blockRange member set to true. As a result, the screen reader would read the block range of text from "start" to "end" as if it was a block selection created by Alt+Mouse.

References

#7000 - Epic
Closes #6986
Closes #7960

Detailed Description of the Pull Request / Additional comments

Coming soon!

Validation Steps Performed

  • Tests added/passed
  • NVDA - manual testing
  • Accessibility Insights - manual testing
  • Narrator - manual testing

@ghost ghost added Area-Accessibility Issues related to accessibility Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-1 A description (P1) Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal. labels Jun 25, 2021
@carlos-zamora
Copy link
Member Author

TODO

  • Bug: "move to next word" when on the last word does not tell screen reader that we're on the bottom
  • Fix tests
  • Get performance traces of word navigation before/after this change

@carlos-zamora
Copy link
Member Author

Most of the code that's submitted won't be touched, so a review would be much appreciated!

@codeofdusk
Copy link
Contributor

Bug:

  1. Start NVDA and conhost.
  2. type "ssh" followed by a space.
  3. Delete the entered text with backspace.

NVDA says, on each press of backspace: "h, h, s, s".

NVDA should say (and said before this PR): "space, h, s, s".

{
return bufferSize.EndExclusive();
}
// if we're already on/past the last RegularChar,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite the last regular char. We need (user-entered) spaces, just not the extraneous thousands of newlines.

@carlos-zamora carlos-zamora force-pushed the dev/cazamor/a11y-7000/text-attributes branch from a99fa3c to 84fdf5a Compare June 29, 2021 23:43
@ghost ghost closed this Jul 9, 2021
@ghost ghost deleted the branch dev/cazamor/a11y-7000/text-attributes July 9, 2021 23:21
@DHowett
Copy link
Member

DHowett commented Jul 10, 2021

@carlos-zamora automerge broke this

@carlos-zamora
Copy link
Member Author

@carlos-zamora automerge broke this

Urgh. I rebased it locally, but haven't pushed the changes yet. I'll fix this on Monday. Thanks.

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 Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-1 A description (P1) 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