MCPcopy
hub / github.com/adobe/react-spectrum / acceptNode

Function acceptNode

packages/@react-spectrum/s2/src/Picker.tsx:612–616  ·  view source on GitHub ↗
(node: Element)

Source from the content-addressed store, hash-verified

610 let doc = getOwnerDocument(renderValueRef.current);
611 let walker = createShadowTreeWalker(doc, renderValueRef.current, NodeFilter.SHOW_ELEMENT, {
612 acceptNode(node: Element) {
613 let role = node.getAttribute('role');
614 let interactive = isFocusable(node) || (role != null && INTERACTIVE_ARIA_ROLES.has(role));
615 return interactive ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
616 }
617 });
618 let next = walker.nextNode();
619 if (next) {

Callers

nothing calls this directly

Calls 2

isFocusableFunction · 0.90
hasMethod · 0.65

Tested by

no test coverage detected