@@ -12,7 +12,7 @@ import { Action } from 'vs/base/common/actions';
1212import { VIEWLET_ID , TEXT_FILE_EDITOR_ID , IExplorerService } from 'vs/workbench/contrib/files/common/files' ;
1313import { ITextFileService , TextFileOperationError , TextFileOperationResult } from 'vs/workbench/services/textfile/common/textfiles' ;
1414import { BaseTextEditor , IEditorConfiguration } from 'vs/workbench/browser/parts/editor/textEditor' ;
15- import { EditorOptions , TextEditorOptions , IEditorCloseEvent } from 'vs/workbench/common/editor' ;
15+ import { EditorOptions , TextEditorOptions , IEditorCloseEvent , Verbosity } from 'vs/workbench/common/editor' ;
1616import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel' ;
1717import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput' ;
1818import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet' ;
@@ -246,16 +246,8 @@ export class TextFileEditor extends BaseTextEditor {
246246 }
247247
248248 protected getAriaLabel ( ) : string {
249- const inputName = this . input ?. getName ( ) ;
250-
251- let ariaLabel : string ;
252- if ( this . input ?. isReadonly ( ) ) {
253- ariaLabel = inputName ? nls . localize ( 'readonlyFileEditorWithInputAriaLabel' , "{0} readonly editor" , inputName ) : nls . localize ( 'readonlyFileEditorAriaLabel' , "Readonly editor" ) ;
254- } else {
255- ariaLabel = inputName ? nls . localize ( 'fileEditorWithInputAriaLabel' , "{0} editor" , inputName ) : nls . localize ( 'fileEditorAriaLabel' , "Editor" ) ;
256- }
257-
258- return ariaLabel ;
249+ const title = this . input ?. getTitle ( Verbosity . SHORT ) || nls . localize ( 'fileEditorAriaLabel' , "editor" ) ;
250+ return this . input ?. isReadonly ( ) ? nls . localize ( 'readonlyEditor' , "{0} readonly" , title ) : title ;
259251 }
260252
261253 clearInput ( ) : void {
0 commit comments