Changing alert back to a focus and fixing tests

This commit is contained in:
Jonathan Bobel
2025-04-02 11:39:07 -04:00
parent 38451d77ad
commit 193184983d
4 changed files with 12 additions and 9 deletions

View File

@@ -10,11 +10,13 @@ function announceUploadStatusFromElement() {
if (message) {
srRegion.textContent = '';
setTimeout(() => {
srRegion.textContent = message;
}, 50);
srRegion.textContent = message + '\u00A0'; // add a non-breaking space
srRegion.focus(); // Optional
}, 300);
}
}
// Exported for use in tests
function initUploadStatusAnnouncer() {
document.addEventListener('DOMContentLoaded', () => {