mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 06:38:23 +00:00
better explorer aria label #90446
This commit is contained in:
parent
2b3fed13e1
commit
55d1af3e68
2 changed files with 3 additions and 2 deletions
|
@ -50,7 +50,7 @@ export class EmptyView extends ViewPane {
|
|||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IOpenerService openerService: IOpenerService
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
|
||||
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('explorerSection', "Explorer Section: No Folder Opened") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
|
||||
this._register(this.contextService.onDidChangeWorkbenchState(() => this.setLabels()));
|
||||
this._register(this.labelService.onDidChangeFormatters(() => this.setLabels()));
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ export class ExplorerView extends ViewPane {
|
|||
@IFileService private readonly fileService: IFileService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
) {
|
||||
super({ ...(options as IViewPaneOptions), id: ExplorerView.ID, ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
|
||||
super({ ...(options as IViewPaneOptions), id: ExplorerView.ID, ariaHeaderLabel: nls.localize('explorerSection', "Explorer Section: {0}", labelService.getWorkspaceLabel(contextService.getWorkspace())) }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
|
||||
|
||||
this.resourceContext = instantiationService.createInstance(ResourceContextKey);
|
||||
this._register(this.resourceContext);
|
||||
|
@ -229,6 +229,7 @@ export class ExplorerView extends ViewPane {
|
|||
const title = workspace.folders.map(folder => folder.name).join();
|
||||
titleElement.textContent = this.name;
|
||||
titleElement.title = title;
|
||||
titleElement.setAttribute('aria-label', nls.localize('explorerSection', "Explorer Section: {0}", this.name));
|
||||
};
|
||||
|
||||
this._register(this.contextService.onDidChangeWorkspaceName(setHeader));
|
||||
|
|
Loading…
Reference in a new issue