Give all HTML button elements a type

The HTML button elements we use are all regular buttons that don't
submit form data to a server. According to
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#notes
those buttons should all have their type set to `button` explicitly, but
we only do that a handful of them. This commit fixes the issue by
consistently giving all our buttons the `button` type.

Co-authored-by: Calixte Denizet <calixte.denizet@gmail.com>
This commit is contained in:
Tim van der Meij 2024-07-30 18:35:12 +02:00
parent 8f45374881
commit f1f58bbe67
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
5 changed files with 58 additions and 58 deletions

View file

@ -9,8 +9,8 @@
<h1>'Previous/Next' example</h1>
<div>
<button id="prev">Previous</button>
<button id="next">Next</button>
<button id="prev" type="button">Previous</button>
<button id="next" type="button">Next</button>
&nbsp; &nbsp;
<span>Page: <span id="page_num"></span> / <span id="page_count"></span></span>
</div>