8000 For the button element, make 'button' the default value for the type attribute (instead of 'submit') · Issue #9848 · whatwg/html · GitHub
[go: up one dir, main page]

Skip to content
/ html Public

For the button element, make 'button' the default value for the type attribute (instead of 'submit') #9848

@ni11c

Description

@ni11c

What is the issue with the HTML Standard?

It seems that many developers find it weird that the default behaviour of a element is to submit the form when no type is specified. See this SO question as an illustration. Why not make the missing value default of the type attribute be 'button' instead of 'submit' as I feel it is more logical with the very nature of the button element ?

Now I appreciate that there is a backwards compatibility issue here, as it would break many websites which rely on the default submit behaviour, but medium to long term this makes more sense and is more consistent.

Sorry if this is a duplicate, I could not find any other one stating the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0