Hover and Focus States
Hover and focus states refer to the visual feedback displayed when users interact with an element either by hovering a mouse pointer over it or focusing on it using a keyboard or assistive device. These states provide essential cues about interactivity, helping users understand what can be clicked or activated.
Accessible design requires that both hover (mouse) and focus (keyboard) states are clearly visible and meet colour contrast requirements. Removing focus outlines (outline: none;) is a common accessibility violation because it leaves keyboard users without any indication of where they are. Developers should instead customise the focus style (for example, using a thicker border, background colour change, or shadow).
WCAG 2.4.7 (Focus Visible) and 1.4.13 (Content on Hover or Focus) ensure that interactive components remain visible, usable, and stable when hovered or focused. Popups or tooltips triggered by hover should remain accessible to keyboard users and should not disappear abruptly.
Accessible outcome: All users, whether navigating by mouse, keyboard, or assistive technology receive clear, consistent feedback when interacting with page elements, enabling smoother and more confident navigation.