Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pygy opened this issue Jan 24, 2024 · 1 comment
Open

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

pygy opened this issue Jan 24, 2024 · 1 comment

Comments

@pygy
Copy link

pygy commented Jan 24, 2024

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.

  • In Safari, the click is always forwarded
  • In Chrome, the click is forwarded if no selection was created when moving the mouse around (mouseup must fire on the same half-character mousedown did).
  • In firefox, no click is forwarded if you move the pointer at all.

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

  • Safari and Chrome always forward the click (that is also the native macOS behavior)
  • Firefox the click is forwarded if you release the mouse on the same half-character as you started and if you don't leave the label while moving the pointer.

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
Copy link
Author

pygy commented Feb 14, 2024

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

  • accessibility
  • interop
  • topic: form
  • topic: drag-and-drop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants
@pygy and others