html icon indicating copy to clipboard operation
html copied to clipboard

inconsistent input label `:active` and `:hover` behavior

Open valler opened this issue 1 year ago • 1 comments

What is the issue with the HTML Standard?

I observed the following behavior in at least one browser on a labeled checkbox:

As expected directly clicking on the labeled element will always trigger :active styles.

Clicking a label with a pointer triggers :active styles on the labeled element, but only if the labeled element is not focused.

For comparison: hovering over labels does not depend on whether the labeled element is focused or not.

Is this intended and speced? Feels buggy and inconsistent.

I came across #6635, #1632 and while somewhat related these don't seem to answer this question.

valler avatar Aug 05 '24 15:08 valler

On Chromium this is a bug that is currently being fixed. It's the underlying cause of the following issue: https://issues.chromium.org/issues/40934455. The bug isn't present on Safari or Firefox.

joonashalinen avatar Aug 09 '24 06:08 joonashalinen

@valler Is this fixed for you now? If so, you can close this.

sb3nder avatar Sep 02 '25 16:09 sb3nder

Yes, Chromium now shows :active styles on labels of focused inputs.

valler avatar Sep 11 '25 02:09 valler