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

Method getLabelledById

core/src/components/input/input.tsx:776–786  ·  view source on GitHub ↗

* Returns the ID to use for aria-labelledby on the native input, * or undefined if aria-label is explicitly set (to avoid conflicts).

()

Source from the content-addressed store, hash-verified

774 * or undefined if aria-label is explicitly set (to avoid conflicts).
775 */
776 private getLabelledById(): string | undefined {
777 if (this.inheritedAttributes['aria-label']) {
778 return undefined;
779 }
780
781 if (this.label !== undefined) {
782 return this.labelTextId;
783 }
784
785 return this.labelSlot?.id || undefined;
786 }
787
788 /**
789 * Returns `true` if label content is provided

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected