@@ -48,6 +48,7 @@ import { SubmenuItemAction } from 'vs/platform/actions/common/actions';
48
48
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
49
49
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
50
50
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution' ;
51
+ import * as aria from 'vs/base/browser/ui/aria/aria' ;
51
52
52
53
const defaultAriaLabel = localize ( 'aria-label' , "Interactive Editor Input" ) ;
53
54
@@ -232,6 +233,7 @@ export class InteractiveEditorWidget {
232
233
const hasFocus = this . _inputEditor . hasWidgetFocus ( ) ;
233
234
ctxInputEditorFocused . set ( hasFocus ) ;
234
235
this . _elements . content . classList . toggle ( 'synthetic-focus' , hasFocus ) ;
236
+ this . readPlaceholder ( ) ;
235
237
} ;
236
238
this . _store . add ( this . _inputEditor . onDidFocusEditorWidget ( updateFocused ) ) ;
237
239
this . _store . add ( this . _inputEditor . onDidBlurEditorWidget ( updateFocused ) ) ;
@@ -252,6 +254,7 @@ export class InteractiveEditorWidget {
252
254
const hasText = this . _inputModel . getValueLength ( ) > 0 ;
253
255
this . _elements . placeholder . classList . toggle ( 'hidden' , hasText ) ;
254
256
this . _ctxInputEmpty . set ( ! hasText ) ;
257
+ this . readPlaceholder ( ) ;
255
258
256
259
const contentHeight = this . _inputEditor . getContentHeight ( ) ;
257
260
if ( contentHeight !== currentContentHeight && this . _lastDim ) {
@@ -387,6 +390,13 @@ export class InteractiveEditorWidget {
387
390
this . _elements . placeholder . innerText = value ;
388
391
}
389
392
393
+ readPlaceholder ( ) : void {
394
+ const hasText = this . _inputModel . getValueLength ( ) > 0 ;
395
+ if ( ! hasText ) {
396
+ aria . status ( this . _elements . placeholder . innerText ) ;
397
+ }
398
+ }
399
+
390
400
updateToolbar ( show : boolean ) {
391
401
this . _elements . statusToolbar . classList . toggle ( 'hidden' , ! show ) ;
392
402
this . _onDidChangeHeight . fire ( ) ;
0 commit comments