MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / getAriaLabelledByIds

Function getAriaLabelledByIds

src/helpers/accessibility.ts:186–202  ·  view source on GitHub ↗
(instance: TestInstance)

Source from the content-addressed store, hash-verified

184}
185
186function getAriaLabelledByIds(instance: TestInstance): string[] {
187 const ariaLabelledBy = instance.props['aria-labelledby'];
188 if (typeof ariaLabelledBy === 'string') {
189 return [ariaLabelledBy];
190 }
191
192 const accessibilityLabelledBy = instance.props.accessibilityLabelledBy;
193 if (Array.isArray(accessibilityLabelledBy)) {
194 return accessibilityLabelledBy;
195 }
196
197 if (typeof accessibilityLabelledBy === 'string') {
198 return [accessibilityLabelledBy];
199 }
200
201 return [];
202}
203
204// See: https://github.com/callstack/react-native-testing-library/wiki/Accessibility:-State#busy-state
205export function computeAriaBusy({ props }: TestInstance): boolean {

Callers 1

computeAriaLabelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…