Screen Reader Optimized indicator opens a misleading "enable?" prompt; answering "No" silently disables screen reader mode
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- electron, typescript
調査の方向性
不具合は src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.ts にあります。コマンド 'showEditorScreenReaderNotification' は showScreenReaderNotification() を無条件に呼び出し、Yes/No のアクションは 'on'/'off' を editor.accessibilitySupport に書き込みます。まず showScreenReaderNotification() とステータスバー項目の登録を読み、次に accessibilityService.isScreenReaderOptimized() を確認して、表示するプロンプトを分岐させてください。プロンプトが現在のモードを反映し、すでに有効な場合は Turn Off を提示し、「No」で有効なモードが無効にならなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Type: Bug
Does this issue occur when all extensions are disabled?: Yes — the prompt is created by built-in workbench code (src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.ts); no extension is involved.
Version
- VS Code
1.146.0(commit69047191fc427f2f92828279aae1d90d8eeda7ab), arm64 - OS: macOS 27.3 (26C5035r)
- Display language: zh-hans (the localized string has the same problem: "检测到屏幕阅读器使用情况。是否要启用 editor.accessibilitySupport 以针对屏幕阅读器使用情况优化编辑器?")
- No organization policy (
/Library/Managed Preferences/com.microsoft.VSCodedoes not exist) and no custom profiles — the default profile is the only one.
Steps to reproduce
-
Enable screen reader mode explicitly, e.g. run Toggle Screen Reader Accessibility Mode (
Shift+Option+F1), or set in User settings:"editor.accessibilitySupport": "on" -
Confirm the status bar (lower right) already shows Screen Reader Optimized — the mode is on.
-
Click the Screen Reader Optimized status bar item.
Actual
The notification appears:
Screen reader usage detected. Do you want to enable
editor.accessibilitySupportto optimize the editor for screen reader usage?
Yes / No / Learn More
Problems:
- It asks to enable something that is already enabled.
- It is
sticky: truewithNotificationPriority.URGENT, so it stays on screen until explicitly closed. - Yes writes
'on'again (a no-op). Nothing visible happens and the notification is not dismissed, because the notification is only closed from the configuration-change path. - No writes
editor.accessibilitySupport = "off"— i.e. answering "No" (which reads as "no, I don't want to change anything / don't ask me again") silently turns screen reader mode off. - Every click on the indicator re-opens the prompt.
Expected
The prompt should reflect the current state, for example:
- mode
off/auto: "Enable screen reader mode?" with Enable / Not now - mode
on: "Screen reader optimized mode is on." with Turn Off / Learn More
This also matches the documentation, which says selecting the indicator turns the mode off:
"The Status Bar displays Screen Reader Optimized in the lower right. ... Select either indicator or run the Toggle Screen Reader Accessibility Mode command to turn off screen reader mode."
— https://code.visualstudio.com/docs/configure/accessibility/accessibility#_screen-reader-mode
At a minimum, No must not disable a mode the user never asked to disable.
Root cause
src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.ts (current main):
L35 — the command behind the status bar item calls the prompt unconditionally, bypassing the === 'auto' guard that exists only on the automatic path:
this._register(CommandsRegistry.registerCommand({ id: 'showEditorScreenReaderNotification', handler: () => this.showScreenReaderNotification() }));
L85–L92 — the status bar entry is wired to that command:
command: 'showEditorScreenReaderNotification',
kind: 'prominent',
L52–L80 — the prompt text is state-independent and Yes → 'on', No → 'off':
localize('screenReaderDetectedExplanation.question', "Screen reader usage detected. Do you want to enable {0} to optimize the editor for screen reader usage?", 'editor.accessibilitySupport'),
[{
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, priority: NotificationPriority.URGENT }
L99–L117 — onScreenReaderModeChange() only auto-shows the prompt when screenReaderConfiguration === 'auto', and closes the open notification; but a click-triggered notification is only closed if a configuration change event fires.
Impact
This is actively harmful for screen reader users:
- The indicator contradicts itself — the status bar says "optimized" while the prompt asks whether to enable it.
- Answering No turns the optimization off, silently. A user who just wants to dismiss the prompt loses screen reader mode.
- Because the notification is sticky and urgent, it interrupts work and must be closed with the × button.
Suggested fix
- Branch on
this.accessibilityService.isScreenReaderOptimized()insideshowScreenReaderNotification()and offer Turn Off when the mode is already on. - Or make the status bar item's command the actual toggle (as the docs describe) instead of a prompt.
- Or drop the prompt from the status bar item entirely (see #167962) and keep it only on the
auto-detection path. - Also dismiss the notification after the
Yesaction runs, even when the value does not change.
Related issues
- #167962 — "now that we detect screen readers, consider not prompting"
- #235133 — "Lacking context for question about 'screen reader'"
- #288688 — repeated popup, different trigger
Screenshot
The notification "Screen reader usage detected..." while the status bar simultaneously shows Screen Reader Optimized.
- 主要言語
- TypeScript
- スター
- 196k
- フォーク
- 43.9k
- 平均マージ
- 12時間 49分
- マージ済み PR(30日)
- 682
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
testplan-item
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
testplan-item
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
testplan-item
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
microsoft/vscode の issue をすべて見る
似ている issue
-
bug done
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
neavo/LinguaGacha#1124 ·
メンテナーはふだん 1 日以内に返信
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errors対応中かも @fullsend-ai-coder が今日担当しました。 オープンe2e-failure ready-to-code
難易度 2/5 1時間未満 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
brylie/mission-island#225 ·
メンテナーはふだん 1 日以内に返信
-
status/need-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google-gemini/gemini-cli#30412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sagemathinc/sagebrush#1683 ·
メンテナーはふだん 1 日以内に返信