Closed scottaohara closed 1 year ago
Make
input type=submit
,input type=reset
,input type=button
,input type=image
, andbutton
all have the same allowances if not a descendant of a<form>
or associated with a<form>
. Otherwise, surface a warning that authors SHOULD usetype=button
or ensure that the implicit submit/reset functionality of the control has been suppressed.
the second part of that warning won't make much sense for <input type="image"> though as changing it to
type="button"` makes it not be an image input anymore?
yeh. someone would have to do <button type=button><img ...></button>
This issue was filed while creating the PR to address #375.
input type=image
is a graphical version ofinput type=submit
.The latter, along with
input type=reset
does not allow for any role.The former, along with the
button
element andinput type=button
allow for specific roles.A
button
element defaults totype=submit
if thetype
attribute is missing. The spec does not distinguish the differentbutton
types though.Right now the spec is inconsistent with when these rules apply, so I propose the following:
Make
input type=submit
,input type=reset
,input type=button
,input type=image
, andbutton
all have the same allowances if not a descendant of a<form>
or associated with a<form>
. Otherwise, surface a warning that authors SHOULD usetype=button
or ensure that the implicit submit/reset functionality of the control has been suppressed.cc @stevefaulkner, @patrickhlauke