MCPcopy
hub / github.com/angular/components / setDescribedByIds

Method setDescribedByIds

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

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

(ids: string[])

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

setDescribedByIdsMethod · 0.65

Tested by

no test coverage detected