MCPcopy
hub / github.com/reactjs/react-modal / focusable

Function focusable

src/helpers/tabbable.js:63–69  ·  view source on GitHub ↗
(element, isTabIndexNotNaN)

Source from the content-addressed store, hash-verified

61}
62
63function focusable(element, isTabIndexNotNaN) {
64 const nodeName = element.nodeName.toLowerCase();
65 const res =
66 (tabbableNode.test(nodeName) && !element.disabled) ||
67 (nodeName === "a" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);
68 return res && visible(element);
69}
70
71function tabbable(element) {
72 let tabIndex = element.getAttribute("tabindex");

Callers 1

tabbableFunction · 0.85

Calls 1

visibleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…