OGE logoOGE

Tooltip & Context Menu

Two directives turn the overlay engine into everyday UI: ogeTooltip attaches an accessible, viewport-aware tooltip to any element, and [ogeContextMenu] opens a fully keyboard-navigable menu at the pointer on right-click. Both render into the document body, so overflow or transformed ancestors never clip them.

ogeTooltip tooltipPlacement [ogeContextMenu] contextMenuItemClick

Tooltip basics

Bind a string to ogeTooltip on any element. The bubble shows after a short hover dwell — or instantly on keyboard focus — and hides on leave, blur or Escape. While visible the trigger's aria-describedby points at the bubble, so screen readers announce it; an empty string disables the tooltip entirely.

ogeTooltip aria-describedby Escape

Tooltip placement & delays

tooltipPlacement prefers a side (top, bottom, left, right — centered on the anchor) and flips automatically when the viewport runs out of room. Delays fall back to the global overlay config (provideOgeOverlayConfig) and can be tuned per trigger; tooltipDisabled suppresses the tooltip without removing the directive.

tooltipPlacement tooltipShowDelay tooltipDisabled

Context menu

Bind an OgeMenuItem array to [ogeContextMenu] and right-click opens it at the pointer, replacing the browser menu. Shift+F10 (or the menu key) opens it anchored to the element for keyboard users. The menu takes focus with full arrow-key, Home/End and type-ahead support; Escape and outside clicks close it and focus returns to the target.

[ogeContextMenu] Shift+F10 OgeMenuItem
Right-click here (or focus + Shift+F10)

Context menu events

contextMenuItemClick delivers the activated item with its index and the originating DOM event — the same payload as OgeMenuList. contextMenuOpened and contextMenuClosed track visibility, and items support the full menu model: checkable entries, separators, disabled state, hints and destructive severity.

contextMenuItemClick opened / closed checked & danger
File: quarterly-report.xlsx
last action: —

Notes

  • Tooltips are transient: they never join the Escape stack, so an open tooltip cannot swallow the Escape meant for a drop-down or dialog underneath.
  • The tooltip bubble is pointer-events: none — it never blocks clicks on content beneath it.
  • Give context-menu targets tabindex="0" (when they are not natively focusable) so keyboard users can reach Shift+F10 and focus can be restored after closing.
  • Both directives read provideOgeOverlayConfig() for offsets, viewport padding and tooltip delays.