Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
remove redundant for attribute on labels
Browse files Browse the repository at this point in the history
the labels are wrapping their inputs, which means they do not need a `for` attribute
  • Loading branch information
JakeChampion committed Jun 14, 2021
1 parent 37052af commit c302f29
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion demos/src/dynamic-delayed/dynamic-delayed.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form data-o-component="o-forms">
<label class="o-forms-field" for="my-autocomplete">
<label class="o-forms-field">
<span class="o-forms-title">
<span class="o-forms-title__main">Select your country</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion demos/src/dynamic/dynamic.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form data-o-component="o-forms">
<label class="o-forms-field" for="my-autocomplete">
<label class="o-forms-field">
<span class="o-forms-title">
<span class="o-forms-title__main">Select your country</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion demos/src/static/static.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<label class="o-forms-field" for="my-autocomplete">
<label class="o-forms-field">
<span class="o-forms-title">
<span class="o-forms-title__main">Select your country</span>
</span>
Expand Down
28 changes: 14 additions & 14 deletions test/js/helpers/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ function insert(html) {
}

function htmlCode () {
const html = `<div>
<label class="o-forms-field" for="my-autocomplete">
<span class="o-forms-title">
<span class="o-forms-title__main">Select your country</span>
</span>
<span class="o-forms-input o-forms-input--select o-forms-input--text">
<div data-o-component="o-autocomplete" class="o-autocomplete" id="my-autocomplete">
<select id="my-autocomplete">
<option value=""></option>
<option>Afghanistan</option>
</select>
</div>
</span>
</label>
const html = `<div id=test>
<label class="o-forms-field" >
<span class="o-forms-title">
<span class="o-forms-title__main">Select your country</span>
</span>
<span class="o-forms-input o-forms-input--select o-forms-input--text">
<div data-o-component="o-autocomplete" class="o-autocomplete" id="my-autocomplete">
<select id="my-autocomplete">
<option value=""></option>
<option>Afghanistan</option>
</select>
</div>
</span>
</label>
</div>
`;
insert(html);
Expand Down

0 comments on commit c302f29

Please sign in to comment.