Skip to content
Draft
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
16 changes: 13 additions & 3 deletions src/components/kids/layout/background-music.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ export function MusicButton() {
return (
<button
onClick={toggleMusic}
className="pixel-btn pixel-btn-amber flex h-8 items-center px-2 py-1.5"
className="pixel-btn pixel-btn-amber flex h-8 items-center px-2 py-1.5 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"
aria-pressed={isPlaying}
aria-label={labelText}
title={labelText}
>
Expand All @@ -197,11 +198,20 @@ export function MusicVolumeSlider() {
<div className="flex items-center justify-between">
<button
onClick={() => setIsPlaying(!isPlaying)}
className={`rounded-lg px-3 py-1.5 text-sm font-medium transition-colors ${
aria-pressed={isPlaying}
className={`rounded-lg px-3 py-1.5 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none ${
isPlaying ? "bg-[#22C55E] text-white" : "bg-gray-200 text-gray-600"
}`}
>
{isPlaying ? "πŸ”Š On" : "πŸ”‡ Off"}
{isPlaying ? (
<>
<span aria-hidden="true">πŸ”Š</span> On
</>
) : (
<>
<span aria-hidden="true">πŸ”‡</span> Off
</>
)}
</button>
<span className="text-sm text-[#5D4037]">{Math.round(volume * 100)}%</span>
</div>
Expand Down
Loading