diff --git a/src/lib/components/BreakScreen.svelte b/src/lib/components/BreakScreen.svelte index ccff681..6f420a0 100644 --- a/src/lib/components/BreakScreen.svelte +++ b/src/lib/components/BreakScreen.svelte @@ -74,6 +74,18 @@ let breathCountdown = $state(4); let breathScale = $state(0.6); + // Only announce phase name changes (not countdown ticks) to screen readers + let breathAnnouncement = $state(""); + let lastBreathPhase = $state(""); + $effect(() => { + // Extract just the phase name (e.g., "Inhale" from "Inhale 4") + const phaseName = breathPhase?.split(' ')[0] ?? ""; + if (phaseName && phaseName !== lastBreathPhase) { + lastBreathPhase = phaseName; + breathAnnouncement = phaseName; + } + }); + // Map raw 0.6–1.0 scale to 0.9–1.6 range for visible breathing text const textScale = $derived(0.9 + (breathScale - 0.6) * (0.7 / 0.4)); @@ -169,11 +181,11 @@ + {breathAnnouncement} {/if} @@ -185,16 +197,16 @@

{$timer.breakTitle}

-

+

{$timer.breakMessage}

{#if $config.show_break_activities}
-
+
{getCategoryLabel(currentActivity.category)}
-

+

{currentActivity.text}

@@ -205,7 +217,7 @@
@@ -302,11 +319,11 @@ class:text-[10px]={!isModal} class:text-[9px]={isModal} style="transform: scale({textScale}); color: {breathColor}; opacity: {0.5 + breathT * 0.5}; transition: transform 0.15s ease-out, opacity 0.15s ease-out, color 0.15s ease-out;" - aria-live="polite" aria-atomic="true" - aria-label="Breathing guide: {breathPhase} {breathCountdown > 0 ? breathCountdown + ' seconds' : ''}" + aria-hidden="true" > {breathPhase}{breathCountdown > 0 ? ` ${breathCountdown}s` : ""} + {breathAnnouncement} {/if} @@ -328,7 +345,7 @@

-

+
{getCategoryLabel(currentActivity.category)}
-

+

{currentActivity.text}

@@ -354,8 +371,8 @@
+
{#each confettiParticles as p (p.id)} @@ -51,12 +160,31 @@ {/if} {#if showGoal && !showMilestone} - {/each}
- + {$timer.pomodoroCyclePosition + 1}/{$timer.pomodoroTotalInCycle}
+ Pomodoro cycle: session {$timer.pomodoroCyclePosition + 1} of {$timer.pomodoroTotalInCycle} {/if} {#if $timer.microbreakEnabled && !$timer.microbreakActive && $timer.state === "running"} -
+
Goal met {:else} - Goal -
+ Goal +
- + {dailyGoalProgress}/{$config.daily_goal_breaks} {/if} @@ -253,7 +265,7 @@
{#if $timer.hasHadBreak} -

+

Last break {formatDurationAgo($timer.secondsSinceLastBreak)}

{:else} @@ -263,17 +275,24 @@ {#if showNaturalBreakToast} + {/if} @@ -292,94 +311,97 @@ {toggleBtnText} - -
- -
+ + +
- -
- -
+ + +
- -
- -
+ + +
+