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

Buttons should probably have type="button" by default #174

Open
cogk opened this issue Aug 16, 2024 · 0 comments
Open

Buttons should probably have type="button" by default #174

cogk opened this issue Aug 16, 2024 · 0 comments

Comments

@cogk
Copy link

cogk commented Aug 16, 2024

Because without this attribute, buttons have type=submit which is awful in both UX for the blind, could lead to unintentional form submission, and is bad DX for devs (you have to prevent submission when using <form>).

<button
v-bind="$attrs"
:class="buttonClasses"
@click="handleClick"
:disabled="isDisabled"
:ariaLabel="ariaLabel"

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

No branches or pull requests

1 participant