move it elsewhere, add other code

This commit is contained in:
meganrogge
2023-08-04 13:59:24 -07:00
parent 39809e9ecc
commit deb3011d37
5 changed files with 83 additions and 34 deletions

View File

@@ -9,6 +9,7 @@ import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableEle
import { KeyCode } from 'vs/base/common/keyCodes';
import { Disposable } from 'vs/base/common/lifecycle';
import 'vs/css!./hover';
import { localize } from 'vs/nls';
const $ = dom.$;
@@ -94,3 +95,11 @@ export class HoverAction extends Disposable {
}
}
}
export function getHoverAriaLabel(shouldHaveHint?: boolean, keybinding?: any): string | undefined {
if (shouldHaveHint) {
const hint = keybinding ? localize('hoverAccessibleViewHint', "Inspect this in the accessible view with {0}", keybinding) : localize('hoverAccessibleViewHintNoKb', "Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding");
return hint;
}
return;
}