@@ -31,10 +31,10 @@ import { ResourcesDropHandler, DraggedEditorIdentifier, DraggedEditorGroupIdenti
3131import { Color } from 'vs/base/common/color' ;
3232import { INotificationService } from 'vs/platform/notification/common/notification' ;
3333import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
34- import { MergeGroupMode , IMergeGroupOptions , GroupsArrangement } from 'vs/workbench/services/editor/common/editorGroupsService' ;
34+ import { MergeGroupMode , IMergeGroupOptions , GroupsArrangement , IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService' ;
3535import { addClass , addDisposableListener , hasClass , EventType , EventHelper , removeClass , Dimension , scheduleAtNextAnimationFrame , findParentWithClass , clearNode } from 'vs/base/browser/dom' ;
3636import { localize } from 'vs/nls' ;
37- import { IEditorGroupsAccessor , IEditorGroupView , EditorServiceImpl , EDITOR_TITLE_HEIGHT } from 'vs/workbench/browser/parts/editor/editor' ;
37+ import { IEditorGroupsAccessor , IEditorGroupView , EditorServiceImpl , EDITOR_TITLE_HEIGHT , computeEditorAriaLabel } from 'vs/workbench/browser/parts/editor/editor' ;
3838import { CloseOneEditorAction } from 'vs/workbench/browser/parts/editor/editorActions' ;
3939import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
4040import { BreadcrumbsControl } from 'vs/workbench/browser/parts/editor/breadcrumbsControl' ;
@@ -102,7 +102,8 @@ export class TabsTitleControl extends TitleControl {
102102 @IConfigurationService configurationService : IConfigurationService ,
103103 @IFileService fileService : IFileService ,
104104 @IEditorService private readonly editorService : EditorServiceImpl ,
105- @IPathService private readonly pathService : IPathService
105+ @IPathService private readonly pathService : IPathService ,
106+ @IEditorGroupsService private readonly editorGroupService : IEditorGroupsService
106107 ) {
107108 super ( parent , accessor , group , contextMenuService , instantiationService , contextKeyService , keybindingService , telemetryService , notificationService , menuService , quickInputService , themeService , extensionService , configurationService , fileService ) ;
108109
@@ -881,14 +882,13 @@ export class TabsTitleControl extends TitleControl {
881882 private computeTabLabels ( ) : void {
882883 const { labelFormat } = this . accessor . partOptions ;
883884 const { verbosity, shortenDuplicates } = this . getLabelConfigFlags ( labelFormat ) ;
884-
885885 // Build labels and descriptions for each editor
886886 const labels = this . group . editors . map ( editor => ( {
887887 editor,
888888 name : editor . getName ( ) ,
889889 description : editor . getDescription ( verbosity ) ,
890890 title : withNullAsUndefined ( editor . getTitle ( Verbosity . LONG ) ) ,
891- ariaLabel : editor . isReadonly ( ) ? localize ( 'readonlyEditor' , "{0} readonly" , editor . getTitle ( Verbosity . SHORT ) ) : editor . getTitle ( Verbosity . SHORT )
891+ ariaLabel : computeEditorAriaLabel ( editor , this . group , this . editorGroupService . count )
892892 } ) ) ;
893893
894894 // Shorten labels as needed
0 commit comments