only apply hint if enabled

This commit is contained in:
meganrogge
2023-08-10 14:53:29 -07:00
parent a7d7ad8797
commit 11d72d9f1b
3 changed files with 8 additions and 4 deletions

View File

@@ -97,5 +97,5 @@ export class HoverAction extends Disposable {
}
export function getHoverAriaLabel(shouldHaveHint?: boolean, keybinding?: string | null): string | undefined {
return shouldHaveHint ? localize('acessibleViewHint', "Inspect this in the accessible view with {0}.", keybinding) : localize('acessibleViewHintNoKbOpen', "Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding.");
return shouldHaveHint && keybinding ? localize('acessibleViewHint', "Inspect this in the accessible view with {0}.", keybinding) : shouldHaveHint ? localize('acessibleViewHintNoKbOpen', "Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding.") : '';
}