h5p / h5p-drag-text

MIT License
7 stars 71 forks source link

HFP-3847 Improve draggable handling accessibility #149

Open otacke opened 8 months ago

otacke commented 8 months ago

When merged in, will change how hovering a dropzone is detected to improve accessibility.

Currently, a dropzone is considered as being hovered based on the mouse pointer being over the dropzone, not the draggable. This can lead to situations where the draggable is in fact hovering the dropzone, suggesting it can be dropped, but the mouse pointer is not hovering the dropzone, the user releases the mouse button and the draggable is reverted to its original position instead of being dropped to the dropzone. This issue often happens when there's a dropzone on the first line, easily leading the mouse pointer getting set off the original drag position (cmp. e.g. https://h5p.org/node/1289113).

The behavior is changed by changing the jQueryUI tolerance option for droppables from pointer to touch and by disabling dropzones on over events and out events to prevent multiple dropzones from being highlighted when being hovered by a draggable at the same time.

See ticket at https://h5ptechnology.atlassian.net/browse/HFP-3847