bug js file:
core/misc/announce.es6.js
core/misc/announce.js
This file has the following bug code:
Drupal.announce = function(text, priority) {
// Save the text and priority into a closure variable. Multiple simultaneous
// announcements will be concatenated and read in sequence.
announcements.push({
text,
priority,
});
// Immediately invoke the function that debounce returns. 200 ms is right at
// the cusp where humans notice a pause, so we will wait
// at most this much time before the set of queued announcements is read.
return debounce(announce, 200)();
};
here "return debounce(announce, 200)();" , It's a misunderstanding of debounce ,
fixed to:
let announce_debounce = debounce(announce, 200);
Drupal.announce = function (text, priority) {
announcements.push({
text,
priority,
});
return announce_debounce();
};
Sign-offs needed
Regressions here would be serious. Manual testing with screen readers is important. Get sign-off from an accessibility maintainer.