diff --git a/game.js b/game.js index 097abde..477f58e 100644 --- a/game.js +++ b/game.js @@ -1725,12 +1725,19 @@ function renderProgress() { if (nextThreshold !== null) { const range = nextThreshold - prevThreshold; const progress = Math.min(1, (G.totalCode - prevThreshold) / range); - if (bar) bar.style.width = (progress * 100).toFixed(1) + '%'; - if (label) label.textContent = (progress * 100).toFixed(1) + '%'; + const pct = (progress * 100).toFixed(1); + if (bar) { + bar.style.width = pct + '%'; + bar.parentElement.setAttribute('aria-valuenow', Math.round(progress * 100)); + } + if (label) label.textContent = pct + '%'; if (target) target.textContent = `Next: Phase ${currentPhase + 1} (${fmt(nextThreshold)} code)`; } else { // Max phase reached - if (bar) bar.style.width = '100%'; + if (bar) { + bar.style.width = '100%'; + bar.parentElement.setAttribute('aria-valuenow', '100'); + } if (label) label.textContent = 'MAX'; if (target) target.textContent = 'All phases unlocked'; } @@ -1781,7 +1788,7 @@ function renderBuildings() { for (const amt of [1, 10, -1]) { const label = amt === -1 ? 'MAX' : `x${amt}`; const active = G.buyAmount === amt; - html += ``; + html += ``; } html += ''; @@ -1798,7 +1805,7 @@ function renderBuildings() { // Locked preview: show dimmed with unlock hint if (!isUnlocked) { - html += `