SIGN IN SIGN UP

fix(js,cdp): implement label activation behaviour

Activating a label runs a synthetic click on its labeled control: the
element referenced by for, else the first labelable descendant. Neither
HTMLElement.click() nor the CDP click path did this, so a checkbox or
radio built as a styled label could not be operated at all. Checkbox and
radio pre-click activation runs with it, flipping state before the click
event so listeners observe the new value, reverting on cancel, and firing
input then change after an uncancelled toggle.

A disabled control has no activation behaviour, including under a
disabled fieldset outside its first legend child, and only elements that
can actually be disabled are affected. A click on interactive content
inside a label keeps that content's own behaviour. Forwarded events
inherit the trustedness of the click that caused them.

The CDP path calls the same helpers for association, disabled state, and
interactive content instead of restating those rules.

Fixes #721.
V
Vrejf committed
968163d82c53fb4c07d0dc8c2a827b8e3b0eac0e
Parent: f449e6f