# Improve semantics of orphaned form elements such as buttons

**URL:** <https://meta.discourse.org/t/improve-semantics-of-orphaned-form-elements-such-as-buttons/72936>\
**Category:** UX\
**Created:** [10월 27, 2017, 4:41오후 UTC](https://meta.discourse.org/t/improve-semantics-of-orphaned-form-elements-such-as-buttons/72936 "2017-10-27T16:41:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [1월 31, 2018, 7:13오후 UTC](https://meta.discourse.org/t/improve-semantics-of-orphaned-form-elements-such-as-buttons/72936/9 "2018-01-31T19:13:08Z")

</div>

> [@jxpx777](#):
>
> The main issue turned out to be that the “Log In” `<button>` […] does not have a `form` attribute set.

I’ve added the `form` attribute and set the `type` attribute to “`submit`” to the Log In button.

[https://github.com/discourse/discourse/commit/8c91d418ddc240cf6f1faf3561c140b1bdbce130](https://github.com/discourse/discourse/commit/8c91d418ddc240cf6f1faf3561c140b1bdbce130)

@jxpx777 is it enough or do I need to make Log In a child element of the `<form>`?

---

_[View the full topic](https://meta.discourse.org/t/improve-semantics-of-orphaned-form-elements-such-as-buttons/72936)._
