html icon indicating copy to clipboard operation
html copied to clipboard

It's not clear how constraint validation works for FACE if the 'validation anchor' is null

Open EdgarChen opened this issue 1 year ago • 1 comments

What is the issue with the HTML Standard?

This is originated from https://bugzilla.mozilla.org/show_bug.cgi?id=1881199.

The validation anchor can be null as the anchor parameter of setValidity(flags, message, anchor) is optional, https://html.spec.whatwg.org/multipage/custom-elements.html#dom-elementinternals-setvalidity.

But https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#interactively-validate-the-constraints says

For elements that are form-associated custom elements, user agents should use their validation anchor instead, for the purposes of these actions.

It seems like Blink fallback to FACE itself when validation anchor is null. It looks reasonable to me, but I am not sure if this is something we would like to mention in the spec.

EdgarChen avatar Feb 22 '24 10:02 EdgarChen

There is also a bug report at webkit: https://bugs.webkit.org/show_bug.cgi?id=269832

jeripeierSBB avatar Feb 22 '24 10:02 jeripeierSBB

cc @whatwg/components

annevk avatar Feb 26 '24 13:02 annevk