MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / setSlottedLabelId

Method setSlottedLabelId

core/src/components/input/input.tsx:765–770  ·  view source on GitHub ↗

* Ensures the slotted label element has an ID for aria-labelledby. * If no ID exists, we assign one using our generated labelTextId.

()

Source from the content-addressed store, hash-verified

763 * If no ID exists, we assign one using our generated labelTextId.
764 */
765 private setSlottedLabelId() {
766 const slottedLabel = this.labelSlot;
767 if (slottedLabel && !slottedLabel.id) {
768 slottedLabel.id = this.labelTextId;
769 }
770 }
771
772 /**
773 * Returns the ID to use for aria-labelledby on the native input,

Callers 1

connectedCallbackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected