MCPcopy Create free account
hub / github.com/reactjs/react-modal / tabbable

Function tabbable

src/helpers/tabbable.js:70–75  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

68}
69
70function tabbable(element) {
71 let tabIndex = element.getAttribute("tabindex");
72 if (tabIndex === null) tabIndex = undefined;
73 const isTabIndexNaN = isNaN(tabIndex);
74 return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);
75}
76
77export default function findTabbableDescendants(element) {
78 const descendants = [].slice

Callers 1

Calls 1

focusableFunction · 0.85

Tested by

no test coverage detected