From 3a778436b6591bb46c7575d51b532bd0ca85f941 Mon Sep 17 00:00:00 2001 From: Brennan Young Date: Wed, 23 Aug 2023 13:20:16 +0200 Subject: [PATCH] Update index.html --- BUTTONS/Download Button (09-08-23)/index.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); }