visual-studio-codescreen-readers

What does VS Code do with my answer to "Are you using a screen reader to operate VS Code?"


VS Code just asked me "Are you using a screen reader to operate VS Code?" but it gave me no clue about what it would do based on my answers, and I am left to guess.

I don't use a screen reader, but I do use software that uses macOS's accessibility API. I don't want VS Code to turn on a mode that is only useful for users of screen readers, or to disable any features for visual users, but I also don't want to disable access to VS Code through the accessibility API.

It seems to me rather user-antagonistic to simply ask me the question and make the decision for me, as though I can't make the decision, rather than explain to me what it will do.

(If it has a subsequent question or suggestion to make, then it has failed to communicate that fact.)

VS Code has a way of breaking basic features if it thinks you are using a screenreader so the issues I'm afraid of are not merely hypothetical risks.

Update: I forgot to mention that I'm using "Visual Studio Code - Insiders" rather than the normal version of VS Code. I don't know whether that will change anything.

image of the VS Code dialog box asking about the use of a screen reader


Solution

  • It changes the value of your editor.accessibilitySupport setting.

    Straight from the source at microsoft/vscode/src/vs/workbench/browser/parts/editor/accessibilityStatus.ts:

    private showScreenReaderNotification(): void {
        if (!this.screenReaderNotification) {
            this.screenReaderNotification = this.notificationService.prompt(
                Severity.Info,
                localize('screenReaderDetectedExplanation.question', "Are you using a screen reader to operate VS Code?"),
                [{
                    label: localize('screenReaderDetectedExplanation.answerYes', "Yes"),
                    run: () => {
                        this.configurationService.updateValue('editor.accessibilitySupport', 'on', ConfigurationTarget.USER);
                    }
                }, {
                    label: localize('screenReaderDetectedExplanation.answerNo', "No"),
                    run: () => {
                        this.configurationService.updateValue('editor.accessibilitySupport', 'off', ConfigurationTarget.USER);
                    }
                }],
                { sticky: true }
            );
    
            Event.once(this.screenReaderNotification.onDidClose)(() => this.screenReaderNotification = null);
        }
    }
    

    The setting doesn't seem to have an associated description string, or be visible in autocomplete suggestions at all times. But you can find all occurences of it in the source code by searching: https://github.com/microsoft/vscode/search?q=editor.accessibilitySupport. It's used in quite a few of the parts of the VS Code UI.

    According to the user documentation on Accessibility, this setting is for toggling Screen Reader Mode.

    The opposite direction (when VS Code prompts asking if you are using a screen reader) is also confusing to some people. There's a chance the maintainers will improve the description text for that. See https://github.com/microsoft/vscode/issues/235133.