Skip to content
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

Commandfor buttons with missing or invalid type attributes currently work as command buttons #11044

Closed
lukewarlow opened this issue Feb 19, 2025 · 4 comments

Comments

@lukewarlow
Copy link
Member

What is the issue with the HTML Standard?

Per #10832 the intention was that implicit submit buttons would be a no-op but the spec currently makes them work as command invokers.

cc @keithamus

The spec also says that buttons with an invalid type attribute works as a command button. Previously I believe the intention was that these would continue to be submit buttons (though I may be misremembering that).

We should correct the spec, and ensure the tests match for both the missing and invalid cases.

@zcorpan
Copy link
Member

zcorpan commented Feb 19, 2025

Hmmm, I would prefer to make the UA behavior be what we want to happen long term, but use document conformance rules to encourage adding type="button". Otherwise authors will have to include type="button" for far longer than 5 years.

@lukewarlow
Copy link
Member Author

Cc @keithamus and @annevk

We can perhaps discuss this at whatnot tomorrow? I don't mind either way we can update implementations and the tests relatively easily.

@annevk
Copy link
Member

annevk commented Feb 20, 2025

Only when the state is Auto and there is a form owner we would require type=button for now. That still seems reasonable to require and move away from that in a couple of years once it's widely implemented.

@lukewarlow
Copy link
Member Author

#11053 - I've got a PR based on discussions, it removes reset buttons (inc inputs) working as popover or command buttons, it also stops auto buttons acting as command buttons they now no-op as intended originally (I would like to get the spec in a better state and then we can separately discuss if they should no-op or not in a follow up PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants