Skip to content

Should <input type=hidden> match :optional? #11273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Gingeh opened this issue Apr 30, 2025 · 2 comments
Open

Should <input type=hidden> match :optional? #11273

Gingeh opened this issue Apr 30, 2025 · 2 comments
Labels
interop Implementations are not interoperable with each other topic: selectors

Comments

@Gingeh
Copy link

Gingeh commented Apr 30, 2025

What is the issue with the HTML Standard?

The :optional pseudo-class is specified to only match input elements to which the required attribute applies, this excludes hidden inputs.
However, https://wpt.live/html/semantics/selectors/pseudo-classes/required-optional-hidden.html expects hidden inputs to match the :optional pseudo-class regardless of any required attribute, and both Chromium and Webkit implement that behaviour while Firefox does not.

@annevk annevk added interop Implementations are not interoperable with each other topic: selectors labels Apr 30, 2025
@annevk
Copy link
Member

annevk commented Apr 30, 2025

cc @whatwg/css

@whatwg whatwg deleted a comment May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: selectors
Development

No branches or pull requests

2 participants