code: function ModalNavigationHandler(element, loop) {
      // ---------------------------------------------- input arguments processing
  
      if (loop == null) {
          loop = false;
      }
      loop = !!loop;
  
      // -------------------------------------------------------------- processing
  
      // -------------------------------------------------------------------------
  
      var oncatch = function(arg) {
          var navigationInformation = arg.navigationInformation;
          var direction = navigationInformation.direction;
          var origin = navigationInformation.origin;
  
          var reverse = (direction === 'forward' && origin === 'popup') || (direction === 'backward' && origin === 'browser');
          if (loop) {
              reverse = !reverse;
          }
          ariaTemplatesNavigationManager.focusFirst(element, reverse);
      };
  
      // -------------------------------------------------------------------------
  
      var elementInterceptor = ModalNavigationInterceptor({
          getReferenceElement: function() {return element;}
      });
  
      var viewportInterceptor = ViewportNavigationInterceptor();
  
      // ------------------------------------------------------------------ return
  
      return CompositeInterceptor([
          elementInterceptor,
          viewportInterceptor
      ], {
          oncatch: oncatch
      });
  }
docs: ////////////////////////////////////////////////////////////////////////////// Navigation handlers ////////////////////////////////////////////////////////////////////////////// 
  Handles navigation for a modal element.
  
  <p>
  Behavior is to fully contain the navigation inside the modal element, both:
  </p>
  <ul>
  <li>preventing from going out of the page</li>
  <li>going directly into the modal element when coming from outside of the page</li>
  </ul>
  
  @param {HtmlElement} element The reference DOM element
  @param {Boolean} loop When true, it will make the focus cycle inside the given element. Otherwise, it will block at the edges. Defaults to false.
  
  @return {NavigationInterceptor} an instance of NavigationInterceptor