From a51c44307c131557fcac8553df18722775dd9d21 Mon Sep 17 00:00:00 2001 From: Quinten0508 <55107945+Quinten0508@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:29:06 +0200 Subject: [PATCH] added alt text to spaceweather images via js --- assets/scripts/spaceweather.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/scripts/spaceweather.js b/assets/scripts/spaceweather.js index b4e189f..0e51738 100644 --- a/assets/scripts/spaceweather.js +++ b/assets/scripts/spaceweather.js @@ -22,10 +22,14 @@ document.addEventListener('DOMContentLoaded', function() { : 'https://quinten0508.com/api/spaceweather/ovation-south.jpg'; ovationImage.src = imageUrl; + ovationImage.alt = isNorthOvation ? 'Northern Hemisphere Aurora Ovatio visualization' + : 'Southern Hemisphere Aurora Ovation visualization'; + } function fetchOverviewImage() { overview.src = 'https://quinten0508.com/api/spaceweather/overview.gif'; + overview.alt = 'Solar flux and geomagnetic activity graphed' } toggleButton.addEventListener('click', function() {