                   e.preventDefault();
                    setActiveTab(tab, tabs);
                });

                tab.addEventListener('focus', function () {
                    setActiveTab(tab, tabs);
                });

                tab.index = index;
            });
        }

        /**
          Determine which tab to show when an arrow key is pressed
          @param {KeyboardEvent} event
          @param {Array} tabs an array of tabs within a container
        */
        function switchT