We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e0dfc1 commit c10a150Copy full SHA for c10a150
src/material/chips/chip-grid.ts
@@ -305,6 +305,9 @@ export class MatChipGrid
305
registerInput(inputElement: MatChipTextControl): void {
306
this._chipInput = inputElement;
307
this._chipInput.setDescribedByIds(this._ariaDescribedbyIds);
308
+
309
+ // If ids were already attached to host element, can now remove in favor of chipInput
310
+ this._elementRef.nativeElement.removeAttribute('aria-describedby');
311
}
312
313
/**
@@ -364,6 +367,8 @@ export class MatChipGrid
364
367
* @docs-private
365
368
*/
366
369
setDescribedByIds(ids: string[]) {
370
+ // We must keep this up to date to handle the case where ids are set
371
+ // before the chip input is registered.
372
this._ariaDescribedbyIds = ids;
373
374
if (this._chipInput) {
0 commit comments