Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Associate label with input. Include name in input. #92

Merged
merged 6 commits into from Mar 11, 2019

Conversation

SamOdum
Copy link
Contributor

@SamOdum SamOdum commented Mar 5, 2019

Gave the label element a for attribute to link it to its corresponding input element. Also added name attribute to input. Those are best practices.

@msftclas
Copy link

msftclas commented Mar 5, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution! Some changes requested in comments.

@@ -6,7 +6,7 @@ In this demo we are going to cover a few core basics of the language that will h

```html
<div id="contact-form">
<label>Email</label><input id="email" type="email" />
<label for="email">Email</label><input id="email" type="email" name="email"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this form won't be submitted via POST, the name property shouldn't be necessary as far as I'm aware. If you've seen guidance to the contrary, would you mind sharing a link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. The name attribute is for server-side processing.

>
<pre data-lang="css">

<body>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please revert all the changes to this file aside from adding the for attribute to the label?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@micahgodbolt micahgodbolt merged commit 432ae83 into microsoft:master Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants