whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.09k stars 2.66k forks source link

Labeled control when moving the mouse around is inconsistent accross UAs #10083

Open pygy opened 9 months ago

pygy commented 9 months ago

What is the issue with the HTML Standard?

Given <label>Lorem ispum<input></label> if you click and hold the text, move the pointer around then back to the text and release the button, the way the click event is forwarded to the <input> is not consistent across UAs.

When user-select: none(resp. -webkit-user-select) is set via CSS, the behavior is sometimes different.

The last bullet point is a Firefox bug per the current spec which mandates host-like behavior.

I'm not sure about the native macOS behavior when the text of a label can be selected.

I think browsers should behave consistently here (either with the platform, or with each-others (#4516)), but I'm not sure which behavior is preferable.

This is an accessibility issue for users with fine motor control disorders. Input from the WCAG would IMO be important, but I don't know who to tag.

You can find a repro here.

Edit: fixed the exact Firefox behavior

pygy commented 8 months ago

I can't see how to add labels here, but as far as triage goes, I suppose this should get