Closed srsgores closed 9 years ago
Thanks for merging. It looks like we're also not allowing the user to pass in title
, so I think that may deserve a or as well
agreed, there is probably a list of standard attributes that need to be added to every element... just need to figure out what that list is.
@Emerson, actually, an easier fix would be to set tagName
to "button"
instead of "div"
. Then, all you would need to do is attributeBindings: ["title", "disabled", "role"]
. Want me to make another PR?
I think the submit is auto wrapped in a div
tag with the standard wrapper class to keep things consistent with the rest of the fields (all of which are wrapped). I think I'd prefer to move towards something like:
{{fm-submit}} => no wrapper div
and
{{fm-field type="submit"}} => has the standard wrapper div
Any thoughts on that? It would allow us change the tagName, but still requires dealing with data attributes passed through the field.
The current implementation of
<input type="submit"/>
is bad because it reduces accessibility in some screen readers. Furthermore, thebutton
attribute should be used in favour of HTML5. Finally, theinput
element is misleading in that it is not a "modifiable" control; it merely serves one purpose, and that is to trigger thesubmit
action.This change allows the user to pass in extra content into a button (such as an icon):