Content that is revealed on focus and/or hover (such as custom tooltips, sub-menus, nonmodal popups that display on hover and focus - referred to on this page as "popups") can present a variety of challenges to different groups of users.
For these reasons, any content that is revealed on focus and/or hover of a trigger element must be:
Dismissable - recommended approach is to ensure the ESC key will close the content. This allows users to continue to read any surrounding content without having to move their mouse or keyboard focus.
Hoverable - the user must be able to hover over the content that has been exposed; for example, if the user clicks a button and a popup opens, the user must be able to hover over the popup without the popup disappearing.
Persistent - the exposed content does not disappear unless: a) the user removes focus/hover, or b) the user dismisses the exposed content, or c) the exposed content becomes obsolete.
For a custom tooltip demo that meets all three criteria see Heydon Pickering's article on Tooltips & Toggletips.
WCAG 1.4.13 Content on Hover or Focus