Content on hover or focus is accessible
Basic principle
When additional content appears on hover or keyboard focus—such as tooltips, dropdowns, or custom popovers—it must be fully accessible to all users. This means the content should remain visible long enough to be read, be dismissible without moving the pointer or focus, be reachable using the keyboard, and announced by screen readers. Ensuring hover and focus content is accessible helps users who navigate by keyboard or use assistive technologies understand and interact with important information without frustration or confusion.
Testing
Tools: Theme settings, keyboard, screen reader, browser inspector.
- Look for elements that reveal additional content when hovered over with a mouse or focused via keyboard, such as tooltips, help icons, custom error messages or validation messages. These elements are most likely to be found near forms or pricing/features tables.
- Test with a mouse: hover over the trigger element with your mouse and verify that:
- The additional content becomes visible.
- The content remains visible as long as the pointer is over the trigger or the revealed content.
- Moving the pointer to the revealed content does not cause it to disappear prematurely.
- Test with focus interaction with a keyboard: use
taborshift + tabto move focus to the trigger element and verify that:- The same content appears when the element receives focus.
- The revealed content remains visible while focus is on the trigger or the content itself.
- You can reach and interact with links or buttons within the revealed content using only the keyboard (use arrow keys or
tab, depending on the component).
- Verify that users can dismiss the content without moving their pointer or focus. Hover or focus on the trigger element and press the
Esckey; the content on hover/focus should disappear. - Verify the content does not trap keyboard focus or interfere with tab order. When you tab to the element or use arrow keys to reach it, you should be able to tab past the element.
- Test the trigger and content using a screen reader (e.g., NVDA, VoiceOver) and verify that:
- Any additional content, such as helper text, is connected to the trigger using
aria-describedbyand is announced. - The user can perceive and navigate to the content using standard navigation keys.
- Any additional content, such as helper text, is connected to the trigger using
- Check Responsiveness and Zoom: zoom in to 200–400% or resize the window and verify that the hover/focus content:
- Remains visible and usable.
- Does not overlap or become clipped by the viewport.
WP Accessibility Knowledge Base