MCPcopy Create free account
hub / github.com/adobe/react-spectrum / acceptNode

Function acceptNode

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

Source from the content-addressed store, hash-verified

592 let doc = getOwnerDocument(renderValueRef.current);
593 let walker = createShadowTreeWalker(doc, renderValueRef.current, NodeFilter.SHOW_ELEMENT, {
594 acceptNode(node: Element) {
595 let role = node.getAttribute('role');
596 let interactive = isFocusable(node) || (role != null && INTERACTIVE_ARIA_ROLES.has(role));
597 return interactive ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
598 }
599 });
600 let next = walker.nextNode();
601 if (next) {

Callers

nothing calls this directly

Calls 2

isFocusableFunction · 0.90
hasMethod · 0.65

Tested by

no test coverage detected