diff --git a/BUTTONS/Download Button (09-08-23)/index.html b/BUTTONS/Download Button (09-08-23)/index.html index be77604..8ee40d3 100644 --- a/BUTTONS/Download Button (09-08-23)/index.html +++ b/BUTTONS/Download Button (09-08-23)/index.html @@ -339,6 +339,7 @@ return target[key]; } }); + countElem.setAttribute("role", "progressbar"); svgPath.y = 30; svgPath.s = 0; @@ -372,7 +373,12 @@ duration: 3.8, delay: .8, onUpdate() { - countElem.innerHTML = Math.round(count.number) + '%'; + let percLoaded = Math.round(count.number); + countElem.innerHTML = percLoaded + '%'; + countElem.setAttribute("aria-valuenow", percLoaded); + }, + onComplete() { + countElem.setAttribute("aria-valuetext", "done"); } }); @@ -406,6 +412,8 @@ setTimeout(() => { button.classList.remove('loading', 'reset'); iconDiv.removeAttribute('style'); + countElem.setAttribute("aria-valuenow", 0); + countElem.setAttribute("aria-valuetext", ""); }, 400); }