MCPcopy Create free account
hub / github.com/angular/components / setDescribedByIds

Method setDescribedByIds

src/material/chips/chip-grid.ts:367–379  ·  view source on GitHub ↗

* Implemented as part of MatFormFieldControl. * @docs-private

(ids: string[])

Source from the content-addressed store, hash-verified

365 * @docs-private
366 */
367 setDescribedByIds(ids: string[]) {
368 // We must keep this up to date to handle the case where ids are set
369 // before the chip input is registered.
370 this._ariaDescribedbyIds = ids;
371
372 if (this._chipInput) {
373 this._chipInput.setDescribedByIds(ids);
374 } else if (ids.length) {
375 this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));
376 } else {
377 this._elementRef.nativeElement.removeAttribute('aria-describedby');
378 }
379 }
380
381 /**
382 * Implemented as part of ControlValueAccessor.

Callers

nothing calls this directly

Calls 1

setDescribedByIdsMethod · 0.65

Tested by

no test coverage detected