diff --git a/src/vs/base/parts/quickinput/browser/quickInput.ts b/src/vs/base/parts/quickinput/browser/quickInput.ts index e3d36efa45c2e5034a64332b43d1a95497f63f39..6d5d6f50dc5ac4b5e701c37b5957ca463c432387 100644 --- a/src/vs/base/parts/quickinput/browser/quickInput.ts +++ b/src/vs/base/parts/quickinput/browser/quickInput.ts @@ -825,12 +825,15 @@ class QuickPick extends QuickInput implements IQuickPi if (!this.visible) { return; } - let hideInput: boolean; - if (this.ui.isScreenReaderOptimized()) { - // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360 - hideInput = false; - } else { - hideInput = !!this._hideInput && this._items.length > 0; // do not allow to hide input without items + let hideInput = false; + let inputShownJustForScreenReader = false; + if (!!this._hideInput && this._items.length > 0) { + if (this.ui.isScreenReaderOptimized()) { + // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360 + inputShownJustForScreenReader = true; + } else { + hideInput = true; + } } dom.toggleClass(this.ui.container, 'hidden-input', hideInput); const visibilities: Visibilities = { @@ -858,7 +861,9 @@ class QuickPick extends QuickInput implements IQuickPi if (this.ui.inputBox.placeholder !== (this.placeholder || '')) { this.ui.inputBox.placeholder = (this.placeholder || ''); } - if (this.ui.inputBox.ariaLabel !== this.ariaLabel) { + if (inputShownJustForScreenReader) { + this.ui.inputBox.ariaLabel = ''; + } else if (this.ui.inputBox.ariaLabel !== this.ariaLabel) { this.ui.inputBox.ariaLabel = this.ariaLabel; } this.ui.list.matchOnDescription = this.matchOnDescription;