Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,8 @@ <h2 id="playlist-title"><span aria-hidden="true">🎵</span> Jukebox</h2>
</button>
</div>

<canvas id="glCanvas" role="img" aria-label="Game World: Use mouse and keyboard to navigate"></canvas>
<canvas id="glCanvas" role="img" aria-label="Immersive pastel candy forest world with glowing mushrooms, floating clouds, and music-reactive elements" tabindex="0" aria-live="polite" aria-describedby="world-status"></canvas>
<div id="world-status" aria-live="polite" class="visually-hidden">Loading candy world...</div>
<script type="module" src="src/main.ts"></script>
</body>

Expand Down
10 changes: 10 additions & 0 deletions src/core/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ console.log(`[Startup] Camera positioned at ground height: y=${camera.position.y

// --- START BUTTON + MAP GENERATION (unchanged UX) ---
const startButton = document.getElementById('startButton') as HTMLButtonElement | null;
const statusEl = document.getElementById('world-status');

if (startButton) {
startButton.disabled = false;
Expand Down Expand Up @@ -451,6 +452,11 @@ if (startButton) {
const baseLabel = label ?? getGenerationLabel(requestedMode);
const progressLabel = entityType ? `${baseLabel} · ${entityType}` : baseLabel;
loadingScreen.updateProgress(percent, progressLabel);

if (statusEl) {
statusEl.textContent = progressLabel;
}

startButton.style.background = requestedMode === 'CORE'
? `linear-gradient(90deg, #FF9ECD ${percent}%, #FFD4E3 ${percent}%)`
: `linear-gradient(90deg, #FF6B6B ${percent}%, #FFB6C1 ${percent}%)`;
Expand Down Expand Up @@ -478,6 +484,10 @@ if (startButton) {
loadingScreen.completePhase('map-generation');
loadingScreen.hide();

if (statusEl) {
statusEl.textContent = 'World generated. Welcome to Candy World.';
}

// ♿ Aria: Announce that the game is fully loaded and exploration has started
import('../ui/announcer.ts').then(({ announce }) => {
announce('World generated. Welcome to Candy World.', 'assertive');
Expand Down
19 changes: 19 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,22 @@ button.keyboard-active,
transform: scale(0.95);
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* ♿ Aria: Canvas focus visible state */
#glCanvas:focus-visible {
outline: 3px solid rgba(255, 182, 255, 0.8);
box-shadow: 0 0 20px rgba(180, 255, 200, 0.6);
}


.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
Loading