docs: attributes for 'label' and 'input' elements were mixed up (#41827)
A label should be 'for' an input, and an 'input' should have an 'id'. PR Close #41827
This commit is contained in:
parent
dac78d1ba1
commit
b3cd1280da
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
<!-- #docregion add -->
|
<!-- #docregion add -->
|
||||||
<div>
|
<div>
|
||||||
<label id="new-hero">Hero name: </label>
|
<label for="new-hero">Hero name: </label>
|
||||||
<input for="new-hero" #heroName />
|
<input id="new-hero" #heroName />
|
||||||
|
|
||||||
<!-- (click) passes input value to add() and then clears the input -->
|
<!-- (click) passes input value to add() and then clears the input -->
|
||||||
<button class="add-button" (click)="add(heroName.value); heroName.value=''">
|
<button class="add-button" (click)="add(heroName.value); heroName.value=''">
|
||||||
|
|
Loading…
Reference in New Issue