Skip to content

[selectors] :user-interacted pseudo-class to match controls the user has interacted with #11065

Open
@LeaVerou

Description

@LeaVerou

A while back, we resolved to add :user-valid and :user-invalid pseudo-classes to represent :valid and :invalid states the user has interacted with.

These depend on a user has interacted state that is not exposed in any other way. I propose exposing it as a separate pseudo-class, then these become aliases of :user-interacted:valid / :user-interacted:invalid.

This came up in defining how custom element authors expose this state for their custom elements, but the pseudo-class seems useful in its own right, and if browsers are already tracking this state, it should be fairly low effort to implement.

(Name obviously TBB)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions