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
+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() {