status bar: if there are icons in the text use the tooltip for the aria label

#94677
This commit is contained in:
isidor
2020-04-13 11:35:41 +02:00
parent d8da943147
commit 9187e9a718

View File

@@ -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;