@@ -264,7 +264,11 @@ export default function A11y({ swiper, extendParams, on }) {
264
264
const init = ( ) => {
265
265
const params = swiper . params . a11y ;
266
266
267
- swiper . el . append ( liveRegion ) ;
267
+ if ( swiper . isElement ) {
268
+ swiper . el . shadowEl . append ( liveRegion ) ;
269
+ } else {
270
+ swiper . el . append ( liveRegion ) ;
271
+ }
268
272
269
273
// Container
270
274
const containerEl = swiper . el ;
@@ -314,7 +318,7 @@ export default function A11y({ swiper, extendParams, on }) {
314
318
swiper . el . addEventListener ( 'pointerup' , handlePointerUp , true ) ;
315
319
} ;
316
320
function destroy ( ) {
317
- if ( liveRegion && liveRegion . length > 0 ) liveRegion . remove ( ) ;
321
+ if ( liveRegion ) liveRegion . remove ( ) ;
318
322
let { nextEl, prevEl } = swiper . navigation ? swiper . navigation : { } ;
319
323
nextEl = makeElementsArray ( nextEl ) ;
320
324
prevEl = makeElementsArray ( prevEl ) ;
@@ -345,9 +349,6 @@ export default function A11y({ swiper, extendParams, on }) {
345
349
liveRegion = createElement ( 'span' , swiper . params . a11y . notificationClass ) ;
346
350
liveRegion . setAttribute ( 'aria-live' , 'assertive' ) ;
347
351
liveRegion . setAttribute ( 'aria-atomic' , 'true' ) ;
348
- if ( swiper . isElement ) {
349
- liveRegion . setAttribute ( 'slot' , 'container-end' ) ;
350
- }
351
352
} ) ;
352
353
353
354
on ( 'afterInit' , ( ) => {
0 commit comments