Skip to content

Commit

Permalink
fix(input): errors with AoT (#UIM-370) (#411)
Browse files Browse the repository at this point in the history
to 8.x
  • Loading branch information
lskramarov authored Feb 17, 2020
1 parent e305b3c commit 2f1ebc9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion packages/mosaic/tags/tag-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ let nextUniqueId = 0;
'[id]': 'id',
'[attr.disabled]': 'disabled || null',
'[attr.placeholder]': 'placeholder || null',
'[attr.aria-invalid]': '_tagList && _tagList.ngControl ? _tagList.ngControl.invalid : null',
'(keydown)': 'keydown($event)',
'(blur)': 'blur()',
'(focus)': 'onFocus()',
Expand Down
14 changes: 0 additions & 14 deletions packages/mosaic/tags/tag-list.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,20 +1096,6 @@ describe('MatTagList', () => {
expect(document.activeElement).toBe(nativeInput, 'Expected input to remain focused.');
}));

it('should set aria-invalid if the form field is invalid', () => {
fixture.componentInstance.control = new FormControl(undefined, [Validators.required]);
fixture.detectChanges();

const input: HTMLInputElement = fixture.nativeElement.querySelector('input');

expect(input.getAttribute('aria-invalid')).toBe('true');

fixture.componentInstance.tags.first.selectViaInteraction();
fixture.detectChanges();

expect(input.getAttribute('aria-invalid')).toBe('false');
});

describe('keyboard behavior', () => {
beforeEach(() => {
tagListDebugElement = fixture.debugElement.query(By.directive(McTagList));
Expand Down

0 comments on commit 2f1ebc9

Please sign in to comment.