diff --git a/examples/carousel/js/carousel.js b/examples/carousel/js/carousel.js index 96e79aeaef..ac7e189908 100644 --- a/examples/carousel/js/carousel.js +++ b/examples/carousel/js/carousel.js @@ -222,4 +222,3 @@ window.addEventListener('load', function () { carousel.init(); } }, false); - diff --git a/examples/dialog-modal/js/datepicker.js b/examples/dialog-modal/js/datepicker.js index 0058fb7be5..cac725bde6 100644 --- a/examples/dialog-modal/js/datepicker.js +++ b/examples/dialog-modal/js/datepicker.js @@ -575,5 +575,3 @@ DatePicker.prototype.setMessage = function (str) { this.lastMessage = str; } }; - - diff --git a/examples/landmarks/js/visua11y.js b/examples/landmarks/js/visua11y.js index 62a58be982..258408db89 100644 --- a/examples/landmarks/js/visua11y.js +++ b/examples/landmarks/js/visua11y.js @@ -27,11 +27,11 @@ function initHeadings() { addPolyfills(); - var targetList = [{ selector: "h1", color: "navy", label: "h1" }, - { selector: "h2", color: "olive", label: "h2" }, - { selector: "h3", color: "purple", label: "h3" }, - { selector: "h4", color: "green", label: "h4" }, - { selector: "h5", color: "gray", label: "h5" }, + var targetList = [{ selector: "h1", color: "navy", label: "h1" }, + { selector: "h2", color: "olive", label: "h2" }, + { selector: "h3", color: "purple", label: "h3" }, + { selector: "h4", color: "green", label: "h4" }, + { selector: "h5", color: "gray", label: "h5" }, { selector: "h6", color: "brown", label: "h6" }]; var selectors = targetList.map(function (tgt) { @@ -84,16 +84,16 @@ function initLandmarks() { return false; } - var targetList = [{ selector: 'aside:not([role]), [role~="complementary"], [role~="COMPLEMENTARY"]', color: "maroon", label: "complementary" }, - { selector: 'form[aria-labelledby], form[aria-label], form[title], [role~="form"], [role~="form"]', color: "maroon", label: "form" }, - { selector: 'footer, [role~="contentinfo"], [role~="CONTENTINFO"]', filter: isContentinfo, color: "olive", label: "contentinfo" }, - { selector: '[role~="application"], [role~="APPLICATION"]', color: "black", label: "application" }, - { selector: 'nav, [role~="navigation"], [role~="NAVIGATION"]', color: "green", label: "navigation" }, - { selector: '[role~="region"][aria-labelledby], [role~="REGION"][aria-labelledby]', color: "teal", label: "region" }, - { selector: '[role~="region"][aria-label], [role~="REGION"][aria-label]', color: "teal", label: "region" }, - { selector: 'section[aria-labelledby], section[aria-label]', color: "teal", label: "region" }, - { selector: 'header, [role~="banner"], [role~="BANNER"]', filter: isBanner, color: "gray", label: "banner" }, - { selector: '[role~="search"], [role~="SEARCH"]', color: "purple", label: "search" }, + var targetList = [{ selector: 'aside:not([role]), [role~="complementary"], [role~="COMPLEMENTARY"]', color: "maroon", label: "complementary" }, + { selector: 'form[aria-labelledby], form[aria-label], form[title], [role~="form"], [role~="form"]', color: "maroon", label: "form" }, + { selector: 'footer, [role~="contentinfo"], [role~="CONTENTINFO"]', filter: isContentinfo, color: "olive", label: "contentinfo" }, + { selector: '[role~="application"], [role~="APPLICATION"]', color: "black", label: "application" }, + { selector: 'nav, [role~="navigation"], [role~="NAVIGATION"]', color: "green", label: "navigation" }, + { selector: '[role~="region"][aria-labelledby], [role~="REGION"][aria-labelledby]', color: "teal", label: "region" }, + { selector: '[role~="region"][aria-label], [role~="REGION"][aria-label]', color: "teal", label: "region" }, + { selector: 'section[aria-labelledby], section[aria-label]', color: "teal", label: "region" }, + { selector: 'header, [role~="banner"], [role~="BANNER"]', filter: isBanner, color: "gray", label: "banner" }, + { selector: '[role~="search"], [role~="SEARCH"]', color: "purple", label: "search" }, { selector: 'main, [role~="main"], [role~="MAIN"]', color: "navy", label: "main" }]; var selectors = targetList.map(function (tgt) { @@ -817,7 +817,6 @@ function nameFromNativeSemantics(element, recFlag) { function nameFromAttributeIdRefs(element, attribute) { var value = getAttributeValue(element, attribute); var idRefs, - i, refElement, accName, arr = []; @@ -825,7 +824,7 @@ function nameFromAttributeIdRefs(element, attribute) { if (value.length) { idRefs = value.split(' '); - for (i = 0; i < idRefs.length; i++) { + for (var i = 0; i < idRefs.length; i++) { refElement = document.getElementById(idRefs[i]); if (refElement) { accName = getAccessibleName(refElement, true); @@ -1697,4 +1696,4 @@ function addPolyfills() { } }; } -} \ No newline at end of file +} diff --git a/examples/tabs/tabs-1/js/tabs.js b/examples/tabs/tabs-1/js/tabs.js index 60c91dd208..28f6c1603b 100644 --- a/examples/tabs/tabs-1/js/tabs.js +++ b/examples/tabs/tabs-1/js/tabs.js @@ -35,7 +35,7 @@ }; // Bind listeners - for (i = 0; i < tabs.length; ++i) { + for (var i = 0; i < tabs.length; ++i) { addListeners(i); } @@ -124,7 +124,7 @@ function switchTabOnArrowPress (event) { var pressed = event.keyCode; - for (x = 0; x < tabs.length; x++) { + for (var x = 0; x < tabs.length; x++) { tabs[x].addEventListener('focus', focusEventHandler); } @@ -170,13 +170,13 @@ // Deactivate all tabs and tab panels function deactivateTabs () { - for (t = 0; t < tabs.length; t++) { + for (var t = 0; t < tabs.length; t++) { tabs[t].setAttribute('tabindex', '-1'); tabs[t].setAttribute('aria-selected', 'false'); tabs[t].removeEventListener('focus', focusEventHandler); } - for (p = 0; p < panels.length; p++) { + for (var p = 0; p < panels.length; p++) { panels[p].classList.add('is-hidden'); } } diff --git a/examples/tabs/tabs-2/js/tabs.js b/examples/tabs/tabs-2/js/tabs.js index b73f327879..7fa9c3c285 100644 --- a/examples/tabs/tabs-2/js/tabs.js +++ b/examples/tabs/tabs-2/js/tabs.js @@ -36,7 +36,7 @@ }; // Bind listeners - for (i = 0; i < tabs.length; ++i) { + for (var i = 0; i < tabs.length; ++i) { addListeners(i); } @@ -171,12 +171,12 @@ // Deactivate all tabs and tab panels function deactivateTabs () { - for (t = 0; t < tabs.length; t++) { + for (var t = 0; t < tabs.length; t++) { tabs[t].setAttribute('tabindex', '-1'); tabs[t].setAttribute('aria-selected', 'false'); } - for (p = 0; p < panels.length; p++) { + for (var p = 0; p < panels.length; p++) { panels[p].classList.add('is-hidden'); } }