You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Word wrap should not be disabled when accessibility is turned on #95428
After discussing with Alexandru Dima (@alexdima) he informed me that we disable word wrap due to this issue #27766
I justr tried and it is still an case, if we would to enable word wrap when screen reader attached Screen Readers (orca, nvda) would read the entire long line when user navigates to its wrapped part.
As Alexandru Dima (@alexdima) puts it we we first need to decide what content do we want to put in the textarea for long wrapped lines.
At the moment we have put the model content (full line) and not the view line content (wrapped part) we might want to put the view line content, which would make it that a line like "a long line" might be put as "a \nlong \nline", which means we put non-existing "\n" in there. The problem has always been how to communicate a wrapping point. Using "\n" for a wrapping point feels incorrect for me, because screen reader will read a new line, but in reality it is not a new line.
Honestly, I think the fact that WordWrap is disabled by default if I use a screen reader, is one of the greatest features of Code. As a braille user, especially when dealing with real code, not text like markdown or HTmL, I would hate it if I cursor down and land in the middle of a line which on the braille display appears as a new line at the beginning of the braille output. Imagine a Python file where indentation is of the essence syntactically, and then getting lines jumping back and forth on the braille display as you cursor up and down. Having to constantly turn word wrap on or off would make dealing with different code parts a real chore for me. And remembering to turn it off or such, too.
Also for speech, when dealing with code, I find it much harder to deal with wrapped lines rather than a long line, which when reviewing, I'd move through either word by word, or character by character, anyway.
I am currently not set up to build VS Code, so someone else would have to do the testing whether cursoring up and down through a wrapped line would still read everything, not just the part that the cursor lands on, the "virtual line", so to speak. But personally, I found it one of the greatest first-time user experiences that WordWrap was turned off for me. No ambiguity, no fuzz.
Marco Zehe (@MarcoZehe) thanks a lot for feedback, very useful to know this. I tried out latest vscode with screen readers and as I mentioned above NVDA and Orca would read the entire long line when user navigates to its wrapped part. So it does not behave well. I just left the instructions for bulding in case VoiceOver owners might want to experiment.
I agree with Marco Zehe (@MarcoZehe) that word wrap in a code editor usually gives a bad experience with screen readers.
It just occurred to me that somehow, this issue is very similar too the issue with broken word navigation in that Code isn't able to override the line offsets that are exposed by IAccessible2.
Having said that, it might help to have a bit of a technical description about what happens exactly when word wrap is on. Is it only a change to how things are displayed and how up/down arrow work? On github for example, there's also word wrap in the comment field, and that works just fine. I wonder how VS Code differs from this default behavior that's probably triggered by changing the width of the area.
If this is to stay in place please consider providing some warning or message when users attempt to "enable" word wrap...or they end up sitting for an hour figuring out why lines are not wrapping 😖
I've also determined with Windows 10, version 2004 there is a feature that lets you know customize the text cursor...this apparently is being considered as a screen reader in VS Code so it disabled word wrap in my editor.
Shawn Melton (@wsmelton) agree, if the user enables word wrap and it is disabled we should do a warning via the notification service. We are open to a PR that fixes this.
Shawn Melton (@wsmelton) A notification is shown when a Screen Reader is detected. The notification reads: "Are you using a screen reader to operate VS Code? (Certain features like word wrap are disabled when using a screen reader)".
Shawn Melton (@wsmelton) Did you by any chance configure "editor.accessibilitySupport" in user settings? If the setting is left to be auto (the default), then VS Code will prompt with a notification when it detects a Screen Reader. The question clearly states that word wrap will be disabled and then you can answer Yes or No. If you answer Yes the setting "editor.accessibilitySupport" is written to user settings to be "on". If you answer No the setting is written to be "off".
It is set to Auto, and I've enabled and disabled an Ease of Use settings in Windows 10...restarted Insiders a few times but never seem to get a prompt.
Activity
isidorn commentedon Apr 16, 2020
After discussing with Alexandru Dima (@alexdima) he informed me that we disable word wrap due to this issue #27766
I justr tried and it is still an case, if we would to enable word wrap when screen reader attached Screen Readers (orca, nvda) would read the entire long line when user navigates to its wrapped part.
As Alexandru Dima (@alexdima) puts it we we first need to decide what content do we want to put in the
textareafor long wrapped lines.At the moment we have put the model content (full line) and not the view line content (wrapped part) we might want to put the view line content, which would make it that a line like
"a long line"might be put as"a \nlong \nline", which means we put non-existing"\n"in there. The problem has always been how to communicate a wrapping point. Using"\n"for a wrapping point feels incorrect for me, because screen reader will read a new line, but in reality it is not a new line.joanmarie Leonard de Ruijter (@LeonarddeR) Marco Zehe (@MarcoZehe) José Vilmar Estácio de Souza (@jvesouza) Marlon Brandão de Sousa (@marlon-sousa) do you have some recommendation on how should we communicate a wrapping point to the users?
In case somebody wants to try word wrapping with screen readers, do the following:
"editor.wordWrap": "on",MarcoZehe commentedon Apr 16, 2020
Honestly, I think the fact that WordWrap is disabled by default if I use a screen reader, is one of the greatest features of Code. As a braille user, especially when dealing with real code, not text like markdown or HTmL, I would hate it if I cursor down and land in the middle of a line which on the braille display appears as a new line at the beginning of the braille output. Imagine a Python file where indentation is of the essence syntactically, and then getting lines jumping back and forth on the braille display as you cursor up and down. Having to constantly turn word wrap on or off would make dealing with different code parts a real chore for me. And remembering to turn it off or such, too.
Also for speech, when dealing with code, I find it much harder to deal with wrapped lines rather than a long line, which when reviewing, I'd move through either word by word, or character by character, anyway.
I am currently not set up to build VS Code, so someone else would have to do the testing whether cursoring up and down through a wrapped line would still read everything, not just the part that the cursor lands on, the "virtual line", so to speak. But personally, I found it one of the greatest first-time user experiences that WordWrap was turned off for me. No ambiguity, no fuzz.
isidorn commentedon Apr 16, 2020
Marco Zehe (@MarcoZehe) thanks a lot for feedback, very useful to know this. I tried out latest vscode with screen readers and as I mentioned above NVDA and Orca would read the entire long line when user navigates to its wrapped part. So it does not behave well. I just left the instructions for bulding in case VoiceOver owners might want to experiment.
LeonarddeR commentedon Apr 16, 2020
I agree with Marco Zehe (@MarcoZehe) that word wrap in a code editor usually gives a bad experience with screen readers.
It just occurred to me that somehow, this issue is very similar too the issue with broken word navigation in that Code isn't able to override the line offsets that are exposed by IAccessible2.
Having said that, it might help to have a bit of a technical description about what happens exactly when word wrap is on. Is it only a change to how things are displayed and how up/down arrow work? On github for example, there's also word wrap in the comment field, and that works just fine. I wonder how VS Code differs from this default behavior that's probably triggered by changing the width of the area.
wsmelton commentedon Jun 5, 2020
If this is to stay in place please consider providing some warning or message when users attempt to "enable" word wrap...or they end up sitting for an hour figuring out why lines are not wrapping 😖
I've also determined with Windows 10, version 2004 there is a feature that lets you know customize the text cursor...this apparently is being considered as a screen reader in VS Code so it disabled word wrap in my editor.
isidorn commentedon Jun 8, 2020
Shawn Melton (@wsmelton) agree, if the user enables word wrap and it is disabled we should do a warning via the notification service. We are open to a PR that fixes this.
alexdima commentedon Jun 8, 2020
Shawn Melton (@wsmelton) A notification is shown when a Screen Reader is detected. The notification reads: "Are you using a screen reader to operate VS Code? (Certain features like word wrap are disabled when using a screen reader)".
wsmelton commentedon Jun 8, 2020
There was no indication it was going to disable word wrap for me with insiders build.
alexdima commentedon Jun 8, 2020
Shawn Melton (@wsmelton) Did you by any chance configure
"editor.accessibilitySupport"in user settings? If the setting is left to beauto(the default), then VS Code will prompt with a notification when it detects a Screen Reader. The question clearly states that word wrap will be disabled and then you can answer Yes or No. If you answer Yes the setting"editor.accessibilitySupport"is written to user settings to be"on". If you answer No the setting is written to be"off".wsmelton commentedon Jun 8, 2020
It is set to Auto, and I've enabled and disabled an Ease of Use settings in Windows 10...restarted Insiders a few times but never seem to get a prompt.
27 remaining items
byehack commentedon Oct 8, 2022
Just wrap current focused line also will be good option that if it available I will enable it.
isidorn commentedon Oct 21, 2022
🎉 👏 🚀