From 9187e9a71815b22efdb03d1a2782358e1009983f Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 13 Apr 2020 11:35:41 +0200 Subject: [PATCH] status bar: if there are icons in the text use the tooltip for the aria label #94677 --- src/vs/workbench/api/browser/mainThreadStatusBar.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/mainThreadStatusBar.ts b/src/vs/workbench/api/browser/mainThreadStatusBar.ts index a3f2cf9279ecc..d2846ff106e9c 100644 --- a/src/vs/workbench/api/browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/browser/mainThreadStatusBar.ts @@ -26,7 +26,9 @@ export class MainThreadStatusBar implements MainThreadStatusBarShape { } $setEntry(id: number, statusId: string, statusName: string, text: string, tooltip: string | undefined, command: Command | undefined, color: string | ThemeColor | undefined, alignment: MainThreadStatusBarAlignment, priority: number | undefined): void { - const entry: IStatusbarEntry = { text, tooltip, command, color, ariaLabel: text }; + // if there are icons in the text use the tooltip for the aria label + const ariaLabel = text.indexOf('$(') === -1 ? text : tooltip || text; + const entry: IStatusbarEntry = { text, tooltip, command, color, ariaLabel }; if (typeof priority === 'undefined') { priority = 0;