Strip Markdown when announcing chat input notification to screen readers#315367
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
renderAsPlaintextfromvs/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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #315360 (review comment from Copilot on the merged PR).
active.messagecan be anIMarkdownString(e.g. the agent-host permission notification wraps paths in backticks). The previous fix passed.valuestraight toaria.status(...), so screen readers would read Markdown syntax — backticks, link targets, etc. — verbatim.This PR:
renderAsPlaintextfromvs/base/browser/markdownRendererand uses it to strip Markdown before announcing..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 unrelatedonDidChangefires.Verified:
Core - Typechecktask reportsFinished compilation with 0 errors.