Re: Submitting a form. BUTTON or INPUT

On 01/02/2024 19:19, Bristow, Alan wrote:
[...]
> I would love to strongly advocate for BUTTON,

Any particular actual reason why? Other than personal preference?

Both <input type="submit"> and <button type="submit"> work exactly the 
same, are both exposed as buttons in the accessibility API, announced as 
buttons by screen readers. The only difference is that <button> allows 
for more flexibility in terms of content (as you can have other elements 
inside it, compared to just having the value="..." attribute on the 
input). But for simple submit buttons that just have a text label, there 
is no strong reason...

P
-- 
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke

Received on Thursday, 1 February 2024 20:07:05 UTC