From 2a7a2a7d53a8d34ebf5574228cd0014cbabdaeff Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 21 Sep 2026 16:59:26 +0700 Subject: [PATCH] feat(web): take the quick-match wait's seconds out of the live region The waiting panel's whole role="status" region re-announced itself every second because the seconds counter lived inside it; the counter now sits outside the live text, which only changes (and is only spoken) once. The nudge that offers a bot game while waiting now says it leaves the queue, and its link keeps the difficulty last picked rather than resetting to the ladder's default. The two ways into an online game get sub-labels saying what each actually starts. --- web/src/routes/online/+page.svelte | 90 ++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 24 deletions(-) diff --git a/web/src/routes/online/+page.svelte b/web/src/routes/online/+page.svelte index 731361d..927286b 100644 --- a/web/src/routes/online/+page.svelte +++ b/web/src/routes/online/+page.svelte @@ -54,6 +54,12 @@ */ const QUICK_MATCH_NUDGE_S = 20; + // The rung last played, if this browser has one, so the nudge's bot game + // resumes it rather than opening back on the ladder's own default. + const quickMatchNudgeHref = $derived( + settings.state.lastDifficulty != null ? `/play?difficulty=${settings.state.lastDifficulty}` : '/play' + ); + /** * How long a held request waits before the screen stops saying "connecting" * and starts saying something the player can act on. The backoff is capped @@ -539,14 +545,18 @@ {#if game.state.queued} -
-

{fill(t.quickMatchWaiting, { n: session.state.queuedForS })}

+ the way out. The running seconds sit outside the live region: + inside it, a screen reader announced "n giây" on every tick. --> +
+

{t.quickMatchWaiting}

+ {#if session.state.queuedForS >= QUICK_MATCH_NUDGE_S}

{t.quickMatchNudge} - {t.quickMatchNudgeLink} + {t.quickMatchNudgeLink}

{/if}
@@ -555,18 +565,24 @@ send a real CreateRoom, and the fifth one came back as "you are creating rooms too quickly" to a player who thought they had tapped nothing at all. --> - +
+ +

{t.quickMatchHint}

+
- +
+ +

{t.createRoomHint}

+