Skip to content

Commit a4841e8

Browse files
committed
Fix DAP issues for input
1 parent 19e0108 commit a4841e8

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/input/input.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ storiesOf("Input", module).addDecorator(
2020
}))
2121
.add("Input", () => ({
2222
template: `
23-
<input ibmText placeholder="Optional placeholder text"/>
23+
<input ibmText aria-label="input" placeholder="Optional placeholder text"/>
2424
`
2525
})).add("TextArea", () => ({
2626
template: `
27-
<textarea ibmTextArea placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
27+
<textarea ibmTextArea aria-label="textarea" placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
2828
`
2929
}));

src/input/label.component.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Component, Input, AfterContentInit, ElementRef } from "@angular/core";
1+
import {
2+
Component,
3+
Input,
4+
AfterContentInit,
5+
ElementRef,
6+
HostBinding
7+
} from "@angular/core";
28

39

410
/**
@@ -26,10 +32,8 @@ import { Component, Input, AfterContentInit, ElementRef } from "@angular/core";
2632
@Component({
2733
selector: "ibm-label",
2834
template: `
29-
<div class="bx--form-item">
3035
<label [for]="labelInputID" class="bx--label"><ng-content></ng-content></label>
3136
<ng-content select="input,textarea,div"></ng-content>
32-
</div>
3337
`
3438
})
3539
export class LabelComponent implements AfterContentInit {
@@ -53,6 +57,8 @@ export class LabelComponent implements AfterContentInit {
5357
*/
5458
@Input() labelState: "success" | "warning" | "error" | "" = "";
5559

60+
@HostBinding("class") class = "bx--form-item";
61+
5662
/**
5763
* Creates an instance of LabelComponent.
5864
* @param {ElementRef} elementRef

0 commit comments

Comments
 (0)