Make sure stale statuses are not presented to the screen reader, e.g. Hall Unlocked - This Hall is Locked.

This commit is contained in:
Storm Dragon
2026-07-07 15:31:04 -04:00
parent 506c0530d9
commit 19e03e8708
3 changed files with 6 additions and 16 deletions
@@ -2,7 +2,7 @@
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=skald-git
pkgver=0.0.0.r1540.g26c7808
pkgver=0.0.0.r1547.g506c053
pkgrel=1
pkgdesc='Audio-only hall-based conferencing server'
arch=('x86_64' 'aarch64')
+4 -15
View File
@@ -2650,6 +2650,7 @@ function flushLiveRegion(elementId) {
let text = state.queue.shift();
if(text === undefined) {
announcement.replaceChildren();
state.active = false;
return;
}
@@ -4221,11 +4222,7 @@ document.addEventListener('keydown', function(e) {
setVisibility('show-chat', true);
resizePeers();
// Announce the action
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = 'Chat collapsed';
}
announceChat('Chat collapsed');
// Focus the show-chat button (delayed to ensure announcement is read)
setTimeout(function() {
@@ -4239,11 +4236,7 @@ document.addEventListener('keydown', function(e) {
setVisibility('show-chat', false);
resizePeers();
// Announce the action
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = 'Chat expanded';
}
announceChat('Chat expanded');
// Focus the close-chat button (delayed to ensure announcement is read)
setTimeout(function() {
@@ -4272,11 +4265,7 @@ document.addEventListener('keydown', function(e) {
localMute = !localMute;
setLocalMute(localMute, true);
// Announce the action
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = localMute ? 'Microphone muted' : 'Microphone unmuted';
}
announceChat(localMute ? 'Microphone muted' : 'Microphone unmuted');
// Focus the mute button (delayed to ensure announcement is read)
setTimeout(function() {
+1
View File
@@ -56,6 +56,7 @@ func TestStaticLiveRegionAnnouncementsStayWired(t *testing.T) {
requireFunctionContains(t, js, "announceLiveRegion", "state.queue.push")
requireFunctionContains(t, js, "announceLiveRegion", "flushLiveRegion")
requireFunctionContains(t, js, "flushLiveRegion", "appendChild")
requireFunctionContains(t, js, "flushLiveRegion", "if(text === undefined) {\n announcement.replaceChildren();")
requireFunctionContains(t, js, "addToChatbox", "announceChat")
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand raised`)")
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand lowered`)")