Skip to content

Commit

Permalink
status bar: if there are icons in the text use the tooltip for the ar…
Browse files Browse the repository at this point in the history
…ia label

#94677
  • Loading branch information
isidorn committed Apr 13, 2020
1 parent d8da943 commit 9187e9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vs/workbench/api/browser/mainThreadStatusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9187e9a

Please sign in to comment.