/** *Carousel duplicate aria-live attributes */ (function () { function fixLoopCarouselLiveRegions(scope) { const root = scope || document; root .querySelectorAll('.elementor-widget-loop-carousel.e-widget-swiper') .forEach((widget) => { // Remove "polite" live region on the moving container (causes duplicate chatter) const wrapper = widget.querySelector('.swiper-wrapper[aria-live]'); if (wrapper) { wrapper.removeAttribute('aria-live'); } // Keep the Swiper notification as the single announcer, // but make it polite to avoid interruptive announcements. const note = widget.querySelector('.swiper-notification'); if (note) { note.setAttribute('aria-live', 'polite'); // change assertive -> polite note.setAttribute('aria-atomic', 'true'); } }); } function init() { fixLoopCarouselLiveRegions(document); // Elementor/Swiper can re-render; re-apply when nodes change. const mo = new MutationObserver((mutations) => { for (const m of mutations) { for (const n of m.addedNodes) { if (n && n.nodeType === 1) fixLoopCarouselLiveRegions(n); } } }); mo.observe(document.documentElement, { childList: true, subtree: true }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();