Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 662 Bytes

a11y-mouse-events-have-key-events.md

File metadata and controls

19 lines (12 loc) · 662 Bytes

Pattern: Missing key event for mouse event

Issue: -

Description

Enforce that on:mouseover and on:mouseout are accompanied by on:focus and on:blur, respectively. This helps to ensure that any functionality triggered by these mouse events is also accessible to keyboard users.

<!-- A11y: on:mouseover must be accompanied by on:focus -->
<div on:mouseover={handleMouseover} />

<!-- A11y: on:mouseout must be accompanied by on:blur -->
<div on:mouseout={handleMouseout} />

Further Reading