Skip to content

Strip Markdown when announcing chat input notification to screen readers#315367

Merged
dmitrivMS merged 1 commit into
mainfrom
dev/dmitriv/markdown-follow-up
May 8, 2026
Merged

Strip Markdown when announcing chat input notification to screen readers#315367
dmitrivMS merged 1 commit into
mainfrom
dev/dmitriv/markdown-follow-up

Conversation

@dmitrivMS
Copy link
Copy Markdown
Contributor

Follow-up to #315360 (review comment from Copilot on the merged PR).

active.message can be an IMarkdownString (e.g. the agent-host permission notification wraps paths in backticks). The previous fix passed .value straight to aria.status(...), so screen readers would read Markdown syntax — backticks, link targets, etc. — verbatim.

This PR:

  • Imports renderAsPlaintext from vs/base/browser/markdownRenderer and uses it to strip Markdown before announcing.
  • Keeps the dedupe signature based on the raw .value, which is cheap to compute, and only renders the plaintext after the signature check passes — so we don't pay the parse cost on unrelated onDidChange fires.

Verified: Core - Typecheck task reports Finished compilation with 0 errors.

@dmitrivMS dmitrivMS requested review from Copilot and meganrogge May 8, 2026 21:01
@dmitrivMS dmitrivMS enabled auto-merge (squash) May 8, 2026 21:02
Copy link
Copy Markdown
Collaborator

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

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

thank you!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves screen reader announcements for chat input notifications by ensuring notifications backed by IMarkdownString are converted to plaintext before being sent to aria.status(...), preventing Markdown syntax (backticks, link markup, etc.) from being read aloud.

Changes:

  • Import renderAsPlaintext from vs/base/browser/markdownRenderer.
  • Keep the dedupe signature computed from the raw .value (cheap), and only compute plaintext after the dedupe check passes.
  • Announce the plaintext-rendered notification message (plus optional description) via status(...).
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.ts Convert IMarkdownString notification messages to plaintext before ARIA announcement, while preserving efficient deduping.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@dmitrivMS dmitrivMS merged commit b55aa82 into main May 8, 2026
29 checks passed
@dmitrivMS dmitrivMS deleted the dev/dmitriv/markdown-follow-up branch May 8, 2026 21:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.120.0 milestone May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants