Form-Associated custom element - css pseudo element user-valid/user-invalid set wrongfully when ElementInternals.setValidity is called
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: matthias, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
2.11 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0
Steps to reproduce:
Calling ElementInternals.setValidity() on a FACE will apply the :user-valid/:user-invalid css pseudo element.
Actual results:
:user-valid/:user-invalid gets set
Expected results:
:user-valid/:user-invalid should not be set when updating the validity of the FACE
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
I think this is basically undefined, right? See https://github.com/whatwg/html/issues/9639
Right. Now that i thinking about it I don't know what I should expect.
Initially I expected it to not set anything (never appear as user-interacted) as I would solve the lack of a proper api with a data attribute mimicking the behavior.
So acting as user-invalid is an issue in my case as it's styled before i want/need it to. But considering one might only style errors via user-invlid it's a reasonable default to reflect the current validity state until there is a spec for it. Better to display an invalid state too early then not at all.
Comment 4•1 year ago
|
||
Yeah fwiw that was my reasoning when implementing this.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•