File tree Expand file tree Collapse file tree
src/vs/base/parts/quickinput/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -825,12 +825,15 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
825825 if ( ! this . visible ) {
826826 return ;
827827 }
828- let hideInput : boolean ;
829- if ( this . ui . isScreenReaderOptimized ( ) ) {
830- // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360
831- hideInput = false ;
832- } else {
833- hideInput = ! ! this . _hideInput && this . _items . length > 0 ; // do not allow to hide input without items
828+ let hideInput = false ;
829+ let inputShownJustForScreenReader = false ;
830+ if ( ! ! this . _hideInput && this . _items . length > 0 ) {
831+ if ( this . ui . isScreenReaderOptimized ( ) ) {
832+ // Always show input if screen reader attached https://github.com/microsoft/vscode/issues/94360
833+ inputShownJustForScreenReader = true ;
834+ } else {
835+ hideInput = true ;
836+ }
834837 }
835838 dom . toggleClass ( this . ui . container , 'hidden-input' , hideInput ) ;
836839 const visibilities : Visibilities = {
@@ -858,7 +861,9 @@ class QuickPick<T extends IQuickPickItem> extends QuickInput implements IQuickPi
858861 if ( this . ui . inputBox . placeholder !== ( this . placeholder || '' ) ) {
859862 this . ui . inputBox . placeholder = ( this . placeholder || '' ) ;
860863 }
861- if ( this . ui . inputBox . ariaLabel !== this . ariaLabel ) {
864+ if ( inputShownJustForScreenReader ) {
865+ this . ui . inputBox . ariaLabel = '' ;
866+ } else if ( this . ui . inputBox . ariaLabel !== this . ariaLabel ) {
862867 this . ui . inputBox . ariaLabel = this . ariaLabel ;
863868 }
864869 this . ui . list . matchOnDescription = this . matchOnDescription ;
You can’t perform that action at this time.
0 commit comments