Skip to content

Commit 2accec2

Browse files
committed
add describedByIds to input
1 parent c02624d commit 2accec2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/material/input/input.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,17 @@ export class MatInput
550550
}
551551
}
552552

553+
/**
554+
* Implemented as part of MatFormFieldControl.
555+
* @docs-private
556+
*/
557+
get describedByIds(): string[] {
558+
const element = this._elementRef.nativeElement;
559+
const existingDescribedBy = element.getAttribute('aria-describedby');
560+
561+
return existingDescribedBy?.split(' ') || [];
562+
}
563+
553564
/**
554565
* Implemented as part of MatFormFieldControl.
555566
* @docs-private

0 commit comments

Comments
 (0)