Give the trigger aria-haspopup="dialog" and aria-expanded, and the popover itself role="dialog" (or role="menu" if it's really just a command list). Position it near the trigger with collision avoidance — flip to the other side if it would run off-screen. The native HTML popover attribute now gives top-layer stacking and light-dismiss (closing on outside click) for free.
It differs from a tooltip in interactivity and trigger, as described there. It differs from a dropdown menu in purpose — a dropdown menu narrowly picks one item from a command list, while a popover is a general-purpose container for freer content like a form, an explanation, or a mini widget.
It closes on Esc and outside click, and focus should return to the trigger when it closes.