Change:
on a screen reader on Windows (JAWS/NVDA) in the chat view backspace hear "space' said this is typical of a screen reader. We discussed using an audio cue to indicate deletion. We have concluded it would be better and simpler to just disable this feature for screen reader users. !
-- After this meeting, something came to mind. What if I love the current command deletion behavior and would like to keep it? would you like to add a user setting to toggle this behavior for some advanced users?
We try to add settings sparingly because we want the default experience to be very nice. I will leave this with to decide. We could keep this behavior and mention it in the chat's accessibility help menu so a screen reader user is aware of what's happening.
do you personally anticipate that you would use this setting to preserve the command deletion behavior? Do you know why the screenreader reads 'space' on a deletion? If we can avoid that, would it be more reasonable that hitting backspace results in the screenreader announcing 'exiting mode'?
JooYoung and I discussed that approach and agreed it would be too verbose. We should either use an audio cue, disable the feature, or provide a setting.
Or mention it in the chat's accessibility help?
After thinking about this issue for a day, I think we can add an alert "input cleared" when the command is entirely deleted. I found that character-by-character deletion works after when you move your cursor to the left.
This is great

Discussion:
import { Disposable } from 'vs/base/common/lifecycle'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget } from 'vs/editor/browser/editorBrowser'; import { KeyCode } from 'vs/base/common/keyCodes'; <ins> import { localize } from 'vs/nls'; import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; </ins> export class SlashCommandContentWidget extends Disposable implements IContentWidget { private _domNode = document.createElement('div'); private _lastSlashCommandText: string | undefined; <del> constructor(private _editor: ICodeEditor) { </del> <ins> constructor(private _editor: ICodeEditor, private _accessibilityService: IAccessibilityService) { </ins> super(); this._domNode.toggleAttribute('hidden', true);

range: new Range(1, 1, 1, selection.startColumn), text: null }]); <ins> // Announce the deletion this._accessibilityService.alert(localize('exited slash command mode', 'Exited {0} mode', this._lastSlashCommandText)); </ins> } }

import { IChatService } from 'vs/workbench/contrib/chat/common/chatService'; import { SlashCommandContentWidget } from 'vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget'; import { SubmitAction } from 'vs/workbench/contrib/chat/browser/actions/chatExecuteActions'; <ins> import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; </ins> const decorationDescription = 'chat'; const slashCommandPlaceholderDecorationType = 'chat-session-detail';

@ICodeEditorService private readonly codeEditorService: ICodeEditorService, @IThemeService private readonly themeService: IThemeService, @IChatService private readonly chatService: IChatService, <ins> @IAccessibilityService private readonly accessibilityService: IAccessibilityService, </ins> ) { super();

if (command && inputValue.startsWith(`/${command.command} `)) { if (!this._slashCommandContentWidget) { <del> this._slashCommandContentWidget = new SlashCommandContentWidget(this.widget.inputEditor); </del> <ins> this._slashCommandContentWidget = new SlashCommandContentWidget(this.widget.inputEditor, this.accessibilityService); </ins> this._store.add(this._slashCommandContentWidget); } this._slashCommandContentWidget.setCommandText(command.command);

// slash command content widget <del> this._slashCommandContentWidget = new SlashCommandContentWidget(this._inputEditor); </del> <ins> this._slashCommandContentWidget = new SlashCommandContentWidget(this._inputEditor, this._accessibilityService); </ins> this._store.add(this._slashCommandContentWidget); // toolbars