Change:
Testing the keybinding for verbosity hover over =Shows the keybinding accessibility view of the hover focus to the by clicking A hover for the action shows without the keybinding !

Discussion:
import { IHoverService } from 'vs/platform/hover/browser/hover'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { HoverVerbosityAction } from 'vs/editor/common/languages'; <del> import { DECREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, DECREASE_HOVER_VERBOSITY_ACTION_ID, DECREASE_HOVER_VERBOSITY_ACTION_LABEL, INCREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_LABEL } from 'vs/editor/contrib/hover/browser/hoverActionIds'; </del> <ins> import { DECREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID } from 'vs/editor/contrib/hover/browser/hoverActionIds'; </ins> import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'; import { Action, IAction } from 'vs/base/common/actions';

import { Codicon } from 'vs/base/common/codicons'; import { Emitter, Event } from 'vs/base/common/event'; import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; <ins> import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { labelForHoverVerbosityAction } from 'vs/editor/contrib/hover/browser/markdownHoverParticipant'; </ins> namespace HoverAccessibilityHelpNLS { export const intro = localize('intro', "Focus on the hover widget to cycle through the hover parts with the Tab key.");

if (!hoverController) { return; } <del> this._provider = accessor.get(IInstantiationService).createInstance(HoverAccessibleViewProvider, codeEditor, hoverController); </del> <ins> const keybindingService = accessor.get(IKeybindingService); this._provider = accessor.get(IInstantiationService).createInstance(HoverAccessibleViewProvider, keybindingService, codeEditor, hoverController); </ins> return this._provider; }

} } export class HoverAccessibilityHelpProvider extends BaseHoverAccessibleViewProvider implements IAccessibleViewContentProvider { public readonly options: IAccessibleViewOptions = { type: AccessibleViewType.Help };

public readonly options: IAccessibleViewOptions = { type: AccessibleViewType.View }; constructor( <ins> private readonly _keybindingService: IKeybindingService, </ins> private readonly _editor: ICodeEditor, hoverController: HoverController, ) {

private _getActionFor(editor: ICodeEditor, action: HoverVerbosityAction): IAction { let actionId: string; let accessibleActionId: string; <del> let actionLabel: string; </del> let actionCodicon: ThemeIcon; switch (action) { case HoverVerbosityAction.Increase: actionId = INCREASE_HOVER_VERBOSITY_ACTION_ID; accessibleActionId = INCREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID; <del> actionLabel = INCREASE_HOVER_VERBOSITY_ACTION_LABEL; </del> actionCodicon = Codicon.add; break; case HoverVerbosityAction.Decrease: actionId = DECREASE_HOVER_VERBOSITY_ACTION_ID; accessibleActionId = DECREASE_HOVER_VERBOSITY_ACCESSIBLE_ACTION_ID; <del> actionLabel = DECREASE_HOVER_VERBOSITY_ACTION_LABEL; </del> actionCodicon = Codicon.remove; break; } <ins> const actionLabel = labelForHoverVerbosityAction(this._keybindingService, action); </ins> const actionEnabled = this._hoverController.doesMarkdownHoverAtIndexSupportVerbosityAction(this._markdownHoverFocusedIndex, action); return new Action(accessibleActionId, actionLabel, ThemeIcon.asClassName(actionCodicon), actionEnabled, () => { editor.getAction(actionId)?.run({ index: this._markdownHoverFocusedIndex, focus: false });

const actionElement = dom.append(container, $(ThemeIcon.asCSSSelector(isActionIncrease ? increaseHoverVerbosityIcon : decreaseHoverVerbosityIcon))); actionElement.tabIndex = 0; const hoverDelegate = new WorkbenchHoverDelegate('mouse', false, { target: container, position: { hoverPosition: HoverPosition.LEFT } }, this._configurationService, this._hoverService); <del> if (isActionIncrease) { const kb = this._keybindingService.lookupKeybinding(INCREASE_HOVER_VERBOSITY_ACTION_ID); store.add(this._hoverService.setupUpdatableHover(hoverDelegate, actionElement, kb ? nls.localize('increaseVerbosityWithKb', "Increase Verbosity ({0})", kb.getLabel()) : nls.localize('increaseVerbosity', "Increase Verbosity"))); } else { const kb = this._keybindingService.lookupKeybinding(DECREASE_HOVER_VERBOSITY_ACTION_ID); store.add(this._hoverService.setupUpdatableHover(hoverDelegate, actionElement, kb ? nls.localize('decreaseVerbosityWithKb', "Decrease Verbosity ({0})", kb.getLabel()) : nls.localize('decreaseVerbosity', "Decrease Verbosity"))); } </del> <ins> store.add(this._hoverService.setupUpdatableHover(hoverDelegate, actionElement, labelForHoverVerbosityAction(this._keybindingService, action))); </ins> if (!actionEnabled) { actionElement.classList.add('disabled'); return store;

} return store; } <ins> export function labelForHoverVerbosityAction(keybindingService: IKeybindingService, action: HoverVerbosityAction): string { switch (action) { case HoverVerbosityAction.Increase: { const kb = keybindingService.lookupKeybinding(INCREASE_HOVER_VERBOSITY_ACTION_ID); return kb ? nls.localize('increaseVerbosityWithKb', "Increase Hover Verbosity ({0})", kb.getLabel()) : nls.localize('increaseVerbosity', "Increase Hover Verbosity"); } case HoverVerbosityAction.Decrease: { const kb = keybindingService.lookupKeybinding(DECREASE_HOVER_VERBOSITY_ACTION_ID); return kb ? nls.localize('decreaseVerbosityWithKb', "Decrease Hover Verbosity ({0})", kb.getLabel()) : nls.localize('decreaseVerbosity', "Decrease Hover Verbosity"); } } } </ins>