diff --git a/src/assets/js/map.js b/src/assets/js/map.js index 1f89fed..ad3d8f9 100644 --- a/src/assets/js/map.js +++ b/src/assets/js/map.js @@ -80,7 +80,7 @@ const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce) function updateProgressBar() { - var progressPro = (countryScore / 210); + var progressPro = (countryScore / 209); return progressPro; } ; @@ -323,15 +323,22 @@ const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce) "background-color": colorArray[1], "border-color": colorArray[6] }) - //Show progressbar text on mouse-over + .attr("aria-valuenow", updateProgressBar() * 100) + //Show progressbar text on mouse-over and focus .on("mousemove", function() { d3.select("#progress-text") .transition().duration(prefersReducedMotion ? 0 : 150).style("opacity", 0.9); }) .on("mouseout", function() { d3.select("#progress-text").transition().duration(prefersReducedMotion ? 0 : 150).style("opacity", 0); + }) + .on("focus", () => { + d3.select("#progress-text").transition().duration(prefersReducedMotion ? 0 : 150).style("opacity", 0.9); + }) + .on("blur", () => { + d3.select("#progress-text").transition().duration(prefersReducedMotion ? 0 : 150).style("opacity", 0); }); - d3.select("#progress-text").html("Scrobbled from " + countryScore + "/210 countries").attr("aria-hidden", "true"); + d3.select("#progress-text").html("Scrobbled from " + countryScore + "/209 countries").attr("aria-hidden", "true"); //Draw countries if (redrawMap) { diff --git a/src/assets/js/screenshot.js b/src/assets/js/screenshot.js index da92d5b..9b841dd 100644 --- a/src/assets/js/screenshot.js +++ b/src/assets/js/screenshot.js @@ -68,7 +68,7 @@ var screenshot = {}; ctx.save(); // To draw with different opaticy ctx.globalAlpha = 0.6; ctx.fillStyle = backgroundColor; - let scoreString = SESSION.total_artists + " artists from " + countryScore + " / 210 countries"; + let scoreString = SESSION.total_artists + " artists from " + countryScore + " / 209 countries"; let titleString = SESSION.name + "'s musical world map"; ctx.font = "34px Patua One"; ctx.fillRect(w / 2 - ctx.measureText(titleString).width / 2 - 20, h - 110, ctx.measureText(titleString).width + 40, 100); diff --git a/src/assets/scss/pages/_map.scss b/src/assets/scss/pages/_map.scss index 4ed2672..8acde0e 100644 --- a/src/assets/scss/pages/_map.scss +++ b/src/assets/scss/pages/_map.scss @@ -79,11 +79,11 @@ $controls-padding: 20px; // 3 * (buttonheight + padding) :^) top: 3 * (48px+4px) + $controls-padding + 10px; width: 10px; - bottom: $controls-padding; + bottom: 100px; right: 32px; box-shadow: inset 1px 1px 3px 0px rgba(0, 0, 0, 0.39); border: 0.1em solid; - z-index: 0; + z-index: 2; border-radius: 50px; } diff --git a/src/index.html b/src/index.html index bb9c1ee..0187105 100644 --- a/src/index.html +++ b/src/index.html @@ -178,44 +178,48 @@

Did you find an accessibility bug or something that didn't work quite right?
-
-
-
- + +
+ + +
+ +
+ + + - +
- - +
+ + + + +
+
-
- - - - -
-
- - - - -
-
+