{"version":3,"file":"responsiveNavigation.1f5bf035.js","sources":["../../../src/js/modules/responsive-navigation.js"],"sourcesContent":["\"use strict\";\n\n// NOTE TO SELF\n// Found better example code to reference for improved a11y on drop menus...\n// https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html\n//\n// More at\n// https://www.w3.org/TR/wai-aria-practices/\n// https://www.w3.org/TR/wai-aria-practices/examples/\n\nfunction doMobileNavigation() {\n\t// mobile navigation is one pane at a time, needs to re-arrange some content, and buries layers deeper\n\t// a11y notes based on: https://www.w3.org/WAI/tutorials/menus/flyout/\n\n\t// set the class so the CSS knows what we're doing\n\t\tdocument.querySelector('html').classList.add('js-mobile-nav');\n\n\t// get elements we will be referencing later on\n\t\tconst navMain = document.querySelector('#navMain');\n\t\tconst subNavs = navMain.querySelectorAll('.has-children');\n\t\tconst special = document.querySelector('#special');\n\n\t\n\n\t// add ARIA labels to things that need them\n\t\tsubNavs.forEach(subNav => {\n\t\t\tsubNav.setAttribute('aria-haspopup', true);\n\t\t\tsubNav.setAttribute('aria-expanded', false);\n\t\t});\n\n\t// handle clicks on the subnav toggle\n\t\tsubNavs.forEach(subNav => {\n\t\t\tlet toggle = subNav.querySelector(':scope > a');\n\n\t\t\t// add in a \"back\" button for each\n\t\t\t\tlet subList = subNav.querySelector(':scope > .l-2');\n\t\t\t\tsubList.insertAdjacentHTML(\"afterbegin\", `