Skip to content

Commit bccf049

Browse files
authored
Revert "add setting for aria-live assertive alert for ghost text" (microsoft#175165)
Revert "add setting for aria-live assertive alert for ghost text (microsoft#174606)" This reverts commit 5dc0609.
1 parent 8939e94 commit bccf049

File tree

5 files changed

+308
-302
lines changed

5 files changed

+308
-302
lines changed

src/vs/editor/common/config/editorOptions.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ export interface IEditorOptions {
5757
* The aria label for the editor's textarea (when it is focused).
5858
*/
5959
ariaLabel?: string;
60-
61-
/**
62-
* Control whether a screen reader announces inline suggestion content immediately.
63-
*/
64-
screenReaderAnnounceInlineSuggestion?: boolean;
6560
/**
6661
* The `tabindex` property of the editor's textarea
6762
*/
@@ -4757,7 +4752,6 @@ export const enum EditorOption {
47574752
acceptSuggestionOnEnter,
47584753
accessibilitySupport,
47594754
accessibilityPageSize,
4760-
screenReaderAnnounceInlineSuggestion,
47614755
ariaLabel,
47624756
autoClosingBrackets,
47634757
autoClosingDelete,
@@ -4924,13 +4918,6 @@ export const EditorOptions = {
49244918
ariaLabel: register(new EditorStringOption(
49254919
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content")
49264920
)),
4927-
screenReaderAnnounceInlineSuggestion: register(new EditorBooleanOption(
4928-
EditorOption.screenReaderAnnounceInlineSuggestion, 'screenReaderAnnounceInlineSuggestion', false,
4929-
{
4930-
description: nls.localize('ariaAssertiveInlineSuggestion', "Control whether aria-live assertive & role alert are on the inline suggestion element so that a screen reader detects it immediately."),
4931-
tags: ['accessibility']
4932-
}
4933-
)),
49344921
autoClosingBrackets: register(new EditorStringEnumOption(
49354922
EditorOption.autoClosingBrackets, 'autoClosingBrackets',
49364923
'languageDefined' as 'always' | 'languageDefined' | 'beforeWhitespace' | 'never',

src/vs/editor/common/standalone/standaloneEnums.ts

Lines changed: 136 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -177,143 +177,142 @@ export enum EditorOption {
177177
acceptSuggestionOnEnter = 1,
178178
accessibilitySupport = 2,
179179
accessibilityPageSize = 3,
180-
screenReaderAnnounceInlineSuggestion = 4,
181-
ariaLabel = 5,
182-
autoClosingBrackets = 6,
183-
autoClosingDelete = 7,
184-
autoClosingOvertype = 8,
185-
autoClosingQuotes = 9,
186-
autoIndent = 10,
187-
automaticLayout = 11,
188-
autoSurround = 12,
189-
bracketPairColorization = 13,
190-
guides = 14,
191-
codeLens = 15,
192-
codeLensFontFamily = 16,
193-
codeLensFontSize = 17,
194-
colorDecorators = 18,
195-
colorDecoratorsLimit = 19,
196-
columnSelection = 20,
197-
comments = 21,
198-
contextmenu = 22,
199-
copyWithSyntaxHighlighting = 23,
200-
cursorBlinking = 24,
201-
cursorSmoothCaretAnimation = 25,
202-
cursorStyle = 26,
203-
cursorSurroundingLines = 27,
204-
cursorSurroundingLinesStyle = 28,
205-
cursorWidth = 29,
206-
disableLayerHinting = 30,
207-
disableMonospaceOptimizations = 31,
208-
domReadOnly = 32,
209-
dragAndDrop = 33,
210-
dropIntoEditor = 34,
211-
emptySelectionClipboard = 35,
212-
experimentalWhitespaceRendering = 36,
213-
extraEditorClassName = 37,
214-
fastScrollSensitivity = 38,
215-
find = 39,
216-
fixedOverflowWidgets = 40,
217-
folding = 41,
218-
foldingStrategy = 42,
219-
foldingHighlight = 43,
220-
foldingImportsByDefault = 44,
221-
foldingMaximumRegions = 45,
222-
unfoldOnClickAfterEndOfLine = 46,
223-
fontFamily = 47,
224-
fontInfo = 48,
225-
fontLigatures = 49,
226-
fontSize = 50,
227-
fontWeight = 51,
228-
fontVariations = 52,
229-
formatOnPaste = 53,
230-
formatOnType = 54,
231-
glyphMargin = 55,
232-
gotoLocation = 56,
233-
hideCursorInOverviewRuler = 57,
234-
hover = 58,
235-
inDiffEditor = 59,
236-
inlineSuggest = 60,
237-
letterSpacing = 61,
238-
lightbulb = 62,
239-
lineDecorationsWidth = 63,
240-
lineHeight = 64,
241-
lineNumbers = 65,
242-
lineNumbersMinChars = 66,
243-
linkedEditing = 67,
244-
links = 68,
245-
matchBrackets = 69,
246-
minimap = 70,
247-
mouseStyle = 71,
248-
mouseWheelScrollSensitivity = 72,
249-
mouseWheelZoom = 73,
250-
multiCursorMergeOverlapping = 74,
251-
multiCursorModifier = 75,
252-
multiCursorPaste = 76,
253-
multiCursorLimit = 77,
254-
occurrencesHighlight = 78,
255-
overviewRulerBorder = 79,
256-
overviewRulerLanes = 80,
257-
padding = 81,
258-
parameterHints = 82,
259-
peekWidgetDefaultFocus = 83,
260-
definitionLinkOpensInPeek = 84,
261-
quickSuggestions = 85,
262-
quickSuggestionsDelay = 86,
263-
readOnly = 87,
264-
renameOnType = 88,
265-
renderControlCharacters = 89,
266-
renderFinalNewline = 90,
267-
renderLineHighlight = 91,
268-
renderLineHighlightOnlyWhenFocus = 92,
269-
renderValidationDecorations = 93,
270-
renderWhitespace = 94,
271-
revealHorizontalRightPadding = 95,
272-
roundedSelection = 96,
273-
rulers = 97,
274-
scrollbar = 98,
275-
scrollBeyondLastColumn = 99,
276-
scrollBeyondLastLine = 100,
277-
scrollPredominantAxis = 101,
278-
selectionClipboard = 102,
279-
selectionHighlight = 103,
280-
selectOnLineNumbers = 104,
281-
showFoldingControls = 105,
282-
showUnused = 106,
283-
snippetSuggestions = 107,
284-
smartSelect = 108,
285-
smoothScrolling = 109,
286-
stickyScroll = 110,
287-
stickyTabStops = 111,
288-
stopRenderingLineAfter = 112,
289-
suggest = 113,
290-
suggestFontSize = 114,
291-
suggestLineHeight = 115,
292-
suggestOnTriggerCharacters = 116,
293-
suggestSelection = 117,
294-
tabCompletion = 118,
295-
tabIndex = 119,
296-
unicodeHighlighting = 120,
297-
unusualLineTerminators = 121,
298-
useShadowDOM = 122,
299-
useTabStops = 123,
300-
wordBreak = 124,
301-
wordSeparators = 125,
302-
wordWrap = 126,
303-
wordWrapBreakAfterCharacters = 127,
304-
wordWrapBreakBeforeCharacters = 128,
305-
wordWrapColumn = 129,
306-
wordWrapOverride1 = 130,
307-
wordWrapOverride2 = 131,
308-
wrappingIndent = 132,
309-
wrappingStrategy = 133,
310-
showDeprecated = 134,
311-
inlayHints = 135,
312-
editorClassName = 136,
313-
pixelRatio = 137,
314-
tabFocusMode = 138,
315-
layoutInfo = 139,
316-
wrappingInfo = 140
180+
ariaLabel = 4,
181+
autoClosingBrackets = 5,
182+
autoClosingDelete = 6,
183+
autoClosingOvertype = 7,
184+
autoClosingQuotes = 8,
185+
autoIndent = 9,
186+
automaticLayout = 10,
187+
autoSurround = 11,
188+
bracketPairColorization = 12,
189+
guides = 13,
190+
codeLens = 14,
191+
codeLensFontFamily = 15,
192+
codeLensFontSize = 16,
193+
colorDecorators = 17,
194+
colorDecoratorsLimit = 18,
195+
columnSelection = 19,
196+
comments = 20,
197+
contextmenu = 21,
198+
copyWithSyntaxHighlighting = 22,
199+
cursorBlinking = 23,
200+
cursorSmoothCaretAnimation = 24,
201+
cursorStyle = 25,
202+
cursorSurroundingLines = 26,
203+
cursorSurroundingLinesStyle = 27,
204+
cursorWidth = 28,
205+
disableLayerHinting = 29,
206+
disableMonospaceOptimizations = 30,
207+
domReadOnly = 31,
208+
dragAndDrop = 32,
209+
dropIntoEditor = 33,
210+
emptySelectionClipboard = 34,
211+
experimentalWhitespaceRendering = 35,
212+
extraEditorClassName = 36,
213+
fastScrollSensitivity = 37,
214+
find = 38,
215+
fixedOverflowWidgets = 39,
216+
folding = 40,
217+
foldingStrategy = 41,
218+
foldingHighlight = 42,
219+
foldingImportsByDefault = 43,
220+
foldingMaximumRegions = 44,
221+
unfoldOnClickAfterEndOfLine = 45,
222+
fontFamily = 46,
223+
fontInfo = 47,
224+
fontLigatures = 48,
225+
fontSize = 49,
226+
fontWeight = 50,
227+
fontVariations = 51,
228+
formatOnPaste = 52,
229+
formatOnType = 53,
230+
glyphMargin = 54,
231+
gotoLocation = 55,
232+
hideCursorInOverviewRuler = 56,
233+
hover = 57,
234+
inDiffEditor = 58,
235+
inlineSuggest = 59,
236+
letterSpacing = 60,
237+
lightbulb = 61,
238+
lineDecorationsWidth = 62,
239+
lineHeight = 63,
240+
lineNumbers = 64,
241+
lineNumbersMinChars = 65,
242+
linkedEditing = 66,
243+
links = 67,
244+
matchBrackets = 68,
245+
minimap = 69,
246+
mouseStyle = 70,
247+
mouseWheelScrollSensitivity = 71,
248+
mouseWheelZoom = 72,
249+
multiCursorMergeOverlapping = 73,
250+
multiCursorModifier = 74,
251+
multiCursorPaste = 75,
252+
multiCursorLimit = 76,
253+
occurrencesHighlight = 77,
254+
overviewRulerBorder = 78,
255+
overviewRulerLanes = 79,
256+
padding = 80,
257+
parameterHints = 81,
258+
peekWidgetDefaultFocus = 82,
259+
definitionLinkOpensInPeek = 83,
260+
quickSuggestions = 84,
261+
quickSuggestionsDelay = 85,
262+
readOnly = 86,
263+
renameOnType = 87,
264+
renderControlCharacters = 88,
265+
renderFinalNewline = 89,
266+
renderLineHighlight = 90,
267+
renderLineHighlightOnlyWhenFocus = 91,
268+
renderValidationDecorations = 92,
269+
renderWhitespace = 93,
270+
revealHorizontalRightPadding = 94,
271+
roundedSelection = 95,
272+
rulers = 96,
273+
scrollbar = 97,
274+
scrollBeyondLastColumn = 98,
275+
scrollBeyondLastLine = 99,
276+
scrollPredominantAxis = 100,
277+
selectionClipboard = 101,
278+
selectionHighlight = 102,
279+
selectOnLineNumbers = 103,
280+
showFoldingControls = 104,
281+
showUnused = 105,
282+
snippetSuggestions = 106,
283+
smartSelect = 107,
284+
smoothScrolling = 108,
285+
stickyScroll = 109,
286+
stickyTabStops = 110,
287+
stopRenderingLineAfter = 111,
288+
suggest = 112,
289+
suggestFontSize = 113,
290+
suggestLineHeight = 114,
291+
suggestOnTriggerCharacters = 115,
292+
suggestSelection = 116,
293+
tabCompletion = 117,
294+
tabIndex = 118,
295+
unicodeHighlighting = 119,
296+
unusualLineTerminators = 120,
297+
useShadowDOM = 121,
298+
useTabStops = 122,
299+
wordBreak = 123,
300+
wordSeparators = 124,
301+
wordWrap = 125,
302+
wordWrapBreakAfterCharacters = 126,
303+
wordWrapBreakBeforeCharacters = 127,
304+
wordWrapColumn = 128,
305+
wordWrapOverride1 = 129,
306+
wordWrapOverride2 = 130,
307+
wrappingIndent = 131,
308+
wrappingStrategy = 132,
309+
showDeprecated = 133,
310+
inlayHints = 134,
311+
editorClassName = 135,
312+
pixelRatio = 136,
313+
tabFocusMode = 137,
314+
layoutInfo = 138,
315+
wrappingInfo = 139
317316
}
318317

319318
/**

src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { RenderLineInput, renderViewLine } from 'vs/editor/common/viewLayout/vie
2222
import { InlineDecorationType } from 'vs/editor/common/viewModel';
2323
import { GhostTextReplacement, GhostTextWidgetModel } from 'vs/editor/contrib/inlineCompletions/browser/ghostText';
2424
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
25-
import { AudioCue, IAudioCueService } from 'vs/platform/audioCues/browser/audioCueService';
2625

2726
const ttPolicy = window.trustedTypes?.createPolicy('editorGhostText', { createHTML: value => value });
2827

@@ -37,7 +36,6 @@ export class GhostTextWidget extends Disposable {
3736
private readonly model: GhostTextWidgetModel,
3837
@IInstantiationService private readonly instantiationService: IInstantiationService,
3938
@ILanguageService private readonly languageService: ILanguageService,
40-
@IAudioCueService private readonly audioCueService: IAudioCueService
4139
) {
4240
super();
4341

@@ -159,14 +157,6 @@ export class GhostTextWidget extends Disposable {
159157
hiddenTextStartColumn !== undefined ? { column: hiddenTextStartColumn, length: textBufferLine.length + 1 - hiddenTextStartColumn } : undefined);
160158
this.additionalLinesWidget.updateLines(ghostText.lineNumber, additionalLines, ghostText.additionalReservedLineCount);
161159

162-
163-
this.audioCueService.playAudioCue(AudioCue.inlineSuggestion).then(() => {
164-
if (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) {
165-
const lineText = this.editor.getModel()!.getLineContent(ghostText.lineNumber);
166-
alert(ghostText.renderForScreenReader(lineText));
167-
}
168-
});
169-
170160
if (0 < 0) {
171161
// Not supported at the moment, condition is always false.
172162
this.viewMoreContentWidget = this.renderViewMoreLines(

0 commit comments

Comments
 (0)