microsoft / terminal

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

[Windows Terminal]: Screen reader is just announcing a single character information while navigating using ctrl + left/right arrow keys in mark mode. #17892

Open SaurabhNew opened 1 week ago

SaurabhNew commented 1 week ago

Windows Terminal version

1.22.2362.0

Windows build number

27695.1000

Other Software

Test Environment: OS: Windows 11 Version Dev (OS Build 27695.1000) App: Windows Terminal Preview Screen Reader: Narrator

Steps to reproduce

Repro steps : 1.Open Windows Terminal. 2.Navigate to the editor. 3.Turn on Narrator by pressing 'Ctrl + Windows + Enter' keys. 4.Now turn on mark mode by pressing 'Ctrl + Shift + M' keys.

  1. Now navigate among words using 'Ctrl + Left/Right' keys. 6.Observe the screen reader narration here.

Observation using NVDA and JAWS screen reader: Same issue repro with NVDA and JAWS screen reader also.

User Experience Users who rely on screen reader may not get the info properly while navigating in mark mode.

WCAG Reference Link: https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships

Attachment : Screen reader is not announcing full word information while navigating via ctrl + left_right arrow keys.zip

Expected Behavior

Screen reader should narrate complete word information while navigating using ctrl + left/right arrow keys in mark mode.

Actual Behavior

Screen reader is just announcing a single character information while navigating using ctrl + left/right arrow keys in mark mode. For example: For word "Microsoft", screen reader is just announcing as 'M selected' when we navigate using 'Ctrl + Left' arrow key and announces as 't selected' using 'Ctrl + Right' arrow.

carlos-zamora commented 1 week ago

This is by design. Pressing Ctrl+Left/Right moves you to the previous/next word respectively. You're just moving the cursor around, which is why the resulting announcement by the screen reader is what is selected (in the case above, "M"). If you want to expand the selection instead of just moving the cursor, you'll need to hold the Shift key.

Closing as by design.

lhecker commented 1 week ago

But should we perhaps narrate an entire word when the cursor position moves by more than 1 cell? That's what seems to happen when using Word at least. I'm not entirely sure how to implement this though.

SaurabhNew commented 1 week ago

@carlos-zamora, This issue is logged from the feedback of Adam Samec. As mentioned in the mail we should be able to navigate among the words using 'Ctrl + Left/Right' arrow keys. Screen reader is just narrating as selected with single character information instead of narrating the complete word information.

carlos-zamora commented 1 week ago

I see. Ok, reopening.

Related issues:

I suspect that fixing both of those issues may fix this one inadvertently. Totally based on a hunch, but I wonder if screen readers behave differently when the cursor moves as a degenerate range (like, maybe they automatically read out the current word since there's no selected text).

Tried looking at Word under accevent but all I got was TextSelectionChanged events, which means that the screen reader has special logic to handle that (pretty standard) then calls the UIA APIs off of the text provider.