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 # shellcheck shell=bash disable=SC2034,SC2154
pkgname=skald-git pkgname=skald-git
pkgver=0.0.0.r1540.g26c7808 pkgver=0.0.0.r1547.g506c053
pkgrel=1 pkgrel=1
pkgdesc='Audio-only hall-based conferencing server' pkgdesc='Audio-only hall-based conferencing server'
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
+4 -15
View File
@@ -2650,6 +2650,7 @@ function flushLiveRegion(elementId) {
let text = state.queue.shift(); let text = state.queue.shift();
if(text === undefined) { if(text === undefined) {
announcement.replaceChildren();
state.active = false; state.active = false;
return; return;
} }
@@ -4221,11 +4222,7 @@ document.addEventListener('keydown', function(e) {
setVisibility('show-chat', true); setVisibility('show-chat', true);
resizePeers(); resizePeers();
// Announce the action announceChat('Chat collapsed');
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = 'Chat collapsed';
}
// Focus the show-chat button (delayed to ensure announcement is read) // Focus the show-chat button (delayed to ensure announcement is read)
setTimeout(function() { setTimeout(function() {
@@ -4239,11 +4236,7 @@ document.addEventListener('keydown', function(e) {
setVisibility('show-chat', false); setVisibility('show-chat', false);
resizePeers(); resizePeers();
// Announce the action announceChat('Chat expanded');
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = 'Chat expanded';
}
// Focus the close-chat button (delayed to ensure announcement is read) // Focus the close-chat button (delayed to ensure announcement is read)
setTimeout(function() { setTimeout(function() {
@@ -4272,11 +4265,7 @@ document.addEventListener('keydown', function(e) {
localMute = !localMute; localMute = !localMute;
setLocalMute(localMute, true); setLocalMute(localMute, true);
// Announce the action announceChat(localMute ? 'Microphone muted' : 'Microphone unmuted');
let announcement = document.getElementById('chat-announcements');
if(announcement) {
announcement.textContent = localMute ? 'Microphone muted' : 'Microphone unmuted';
}
// Focus the mute button (delayed to ensure announcement is read) // Focus the mute button (delayed to ensure announcement is read)
setTimeout(function() { 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", "state.queue.push")
requireFunctionContains(t, js, "announceLiveRegion", "flushLiveRegion") requireFunctionContains(t, js, "announceLiveRegion", "flushLiveRegion")
requireFunctionContains(t, js, "flushLiveRegion", "appendChild") requireFunctionContains(t, js, "flushLiveRegion", "appendChild")
requireFunctionContains(t, js, "flushLiveRegion", "if(text === undefined) {\n announcement.replaceChildren();")
requireFunctionContains(t, js, "addToChatbox", "announceChat") requireFunctionContains(t, js, "addToChatbox", "announceChat")
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand raised`)") requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand raised`)")
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand lowered`)") requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand lowered`)")