Skip to content

Commit

Permalink
fix #93936
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Apr 1, 2020
1 parent 5e01fd0 commit 5865d9c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/vs/workbench/browser/actions/windowActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ abstract class BaseOpenRecentAction extends Action {
return {
iconClasses,
label: name,
ariaLabel: isDirty ? nls.localize('recentDirtyAriaLabel', "{0}, dirty workspace, recently opened picker", name) : nls.localize('recentAriaLabel', "{0}, recently opened picker", name),
description: parentPath,
buttons: isDirty ? [this.dirtyRecentlyOpened] : [this.removeFromRecentlyOpened],
openable,
Expand Down
6 changes: 4 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorQuickAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ export abstract class BaseEditorQuickAccessProvider extends PickerQuickAccessPro
label: editor.getName(),
ariaLabel: (() => {
if (mapGroupIdToGroupAriaLabel.size > 1) {
return localize('entryAriaLabelWithGroup', "{0}, {1}, editors picker", editor.getName(), mapGroupIdToGroupAriaLabel.get(groupId));
return isDirty ?
localize('entryAriaLabelWithGroupDirty', "{0}, dirty, {1}, editors picker", editor.getName(), mapGroupIdToGroupAriaLabel.get(groupId)) :
localize('entryAriaLabelWithGroup', "{0}, {1}, editors picker", editor.getName(), mapGroupIdToGroupAriaLabel.get(groupId));
}

return localize('entryAriaLabel', "{0}, editors picker", editor.getName());
return isDirty ? localize('entryAriaLabelDirty', "{0}, dirty, editors picker", editor.getName()) : localize('entryAriaLabel', "{0}, editors picker", editor.getName());
})(),
description: editor.getDescription(),
iconClasses: getIconClasses(this.modelService, this.modeService, resource),
Expand Down
10 changes: 7 additions & 3 deletions src/vs/workbench/contrib/search/browser/anythingQuickAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,13 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
return {
resource,
label,
ariaLabel: isEditorHistoryEntry ?
localize('historyPickAriaLabel', "{0}, recently opened", label) :
localize('filePickAriaLabel', "{0}, file picker", label),
ariaLabel: (() => {
if (isEditorHistoryEntry) {
return isDirty ? localize('historyPickAriaLabelDirty', "{0}, dirty, recently opened", label) : localize('historyPickAriaLabel', "{0}, recently opened", label);
}

return isDirty ? localize('filePickAriaLabelDirty', "{0}, dirty, file picker", label) : localize('filePickAriaLabel', "{0}, file picker", label);
})(),
description,
iconClasses: getIconClasses(this.modelService, this.modeService, resource),
buttons: (() => {
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/electron-browser/actions/windowActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export abstract class BaseSwitchWindow extends Action {
return {
payload: win.id,
label: win.title,
ariaLabel: win.dirty ? nls.localize('windowDirtyAriaLabel', "{0}, dirty window, windows picker", win.title) : nls.localize('windowAriaLabel', "{0}, windows picker", win.title),
iconClasses: getIconClasses(this.modelService, this.modeService, resource, fileKind),
description: (currentWindowId === win.id) ? nls.localize('current', "Current Window") : undefined,
buttons: currentWindowId !== win.id ? win.dirty ? [this.closeDirtyWindowAction] : [this.closeWindowAction] : undefined
Expand Down

0 comments on commit 5865d9c

Please sign in to comment.