src/common/js/winjs/js/base.js
function tabbableElementsNodeFilter(node) {
        var nodeStyle = _ElementUtilities._getComputedStyle(node);
        if (nodeStyle.display === "none" || nodeStyle.visibility === "hidden") {
            return _Global.NodeFilter.FILTER_REJECT;
        }
        if (node._tabContainer) {
            return _Global.NodeFilter.FILTER_ACCEPT;
        }
        if (node.parentNode && node.parentNode._tabContainer) {
            var managedTarget = node.parentNode._tabContainer.childFocus;
            // Ignore subtrees that are under a tab manager but not the child focus. If a node is contained in the child focus, either accept it (if it's tabbable itself), or skip it and find tabbable content inside of it.
            if (managedTarget && node.contains(managedTarget)) {
                return (getTabIndex(node) >= 0 ? _Global.NodeFilter.FILTER_ACCEPT : _Global.NodeFilter.FILTER_SKIP);
            }
            return _Global.NodeFilter.FILTER_REJECT;
        }
        var tabIndex = getTabIndex(node);
        if (tabIndex >= 0) {
            return _Global.NodeFilter.FILTER_ACCEPT;
        }
        return _Global.NodeFilter.FILTER_SKIP;
    }
function tabbableElementsNodeFilter(node) {
        var nodeStyle = _ElementUtilities._getComputedStyle(node);
        if (nodeStyle.display === "none" || nodeStyle.visibility === "hidden") {
            return _Global.NodeFilter.FILTER_REJECT;
        }
        if (node._tabContainer) {
            return _Global.NodeFilter.FILTER_ACCEPT;
        }
        if (node.parentNode && node.parentNode._tabContainer) {
            var managedTarget = node.parentNode._tabContainer.childFocus;
            // Ignore subtrees that are under a tab manager but not the child focus. If a node is contained in the child focus, either accept it (if it's tabbable itself), or skip it and find tabbable content inside of it.
            if (managedTarget && node.contains(managedTarget)) {
                return (getTabIndex(node) >= 0 ? _Global.NodeFilter.FILTER_ACCEPT : _Global.NodeFilter.FILTER_SKIP);
            }
            return _Global.NodeFilter.FILTER_REJECT;
        }
        var tabIndex = getTabIndex(node);
        if (tabIndex >= 0) {
            return _Global.NodeFilter.FILTER_ACCEPT;
        }
        return _Global.NodeFilter.FILTER_SKIP;
    }
function tabbableElementsNodeFilter ( node ) { var nodeStyle = _ElementUtilities . _getComputedStyle ( node ) ; if ( nodeStyle . display === "none" || nodeStyle . visibility === "hidden" ) { return _Global . NodeFilter . FILTER_REJECT ; } if ( node . _tabContainer ) { return _Global . NodeFilter . FILTER_ACCEPT ; } if ( node . parentNode && node . parentNode . _tabContainer ) { var managedTarget = node . parentNode . _tabContainer . childFocus ; // Ignore subtrees that are under a tab manager but not the child focus. If a node is contained in the child focus, either accept it (if it's tabbable itself), or skip it and find tabbable content inside of it. if ( managedTarget && node . contains ( managedTarget ) ) { return ( getTabIndex ( node ) >= 0 ? _Global . NodeFilter . FILTER_ACCEPT : _Global . NodeFilter . FILTER_SKIP ) ; } return _Global . NodeFilter . FILTER_REJECT ; } var tabIndex = getTabIndex ( node ) ; if ( tabIndex >= 0 ) { return _Global . NodeFilter . FILTER_ACCEPT ; } return _Global . NodeFilter . FILTER_SKIP ; }
tabbableElementsNodeFilter works with the TreeWalker to create a view of the DOM tree that is built up of what we want the focusable tree to look like. When it runs into a tab contained area, it rejects anything except the childFocus element so that any potentially tabbable things that the TabContainer doesn't want tabbed to get ignored.
tabbableElementsNodeFilter works with the TreeWalker to create a view of the DOM tree that is built up of what we want the focusable tree to look like . When it runs into a tab contained area it rejects anything except the childFocus element so that any potentially tabbable things that the TabContainer doesn t want tabbed to get ignored .