@@ -184,8 +184,8 @@ class Carousel extends AutoControlledComponent<WithAsProp<CarouselProps>, Carous
184
184
this . showPreviousSlide ( e , true )
185
185
} ,
186
186
showNextSlideByPaddlePress : e => {
187
- e . preventDefault ( )
188
- this . showNextSlide ( e , false )
187
+ e . preventDefault ( )
188
+ this . showNextSlide ( e , false )
189
189
} ,
190
190
showPreviousSlideByPaddlePress : e => {
191
191
e . preventDefault ( )
@@ -244,7 +244,7 @@ class Carousel extends AutoControlledComponent<WithAsProp<CarouselProps>, Carous
244
244
< div style = { styles . itemsContainerWrapper } { ...accessibility . attributes . itemsContainerWrapper } >
245
245
< div
246
246
className = { Carousel . slotClassNames . itemsContainer }
247
- aria-roledescription = { ariaRoleDescription }
247
+ aria-roledescription = { ariaRoleDescription }
248
248
aria-label = "Portrait collection"
249
249
style = { styles . itemsContainer }
250
250
{ ...accessibility . attributes . itemsContainer }
@@ -279,16 +279,20 @@ class Carousel extends AutoControlledComponent<WithAsProp<CarouselProps>, Carous
279
279
280
280
showPreviousSlide = ( e : React . SyntheticEvent , focusItem : boolean ) => {
281
281
this . setActiveIndex ( e , this . state . activeIndex - 1 , focusItem )
282
- // if 'previous' paddle will disappear, will focus 'next' one.
283
- if ( ! this . props . navigation && this . state . activeIndex <= 1 && ! this . props . circular ) {
284
- this . paddleNextRef . current . focus ( )
285
- }
282
+ // if 'previous' paddle will disappear, will focus 'next' one.
283
+ if ( ! this . props . navigation && this . state . activeIndex <= 1 && ! this . props . circular ) {
284
+ this . paddleNextRef . current . focus ( )
285
+ }
286
286
}
287
287
288
288
showNextSlide = ( e : React . SyntheticEvent , focusItem : boolean ) => {
289
289
this . setActiveIndex ( e , this . state . activeIndex + 1 , focusItem )
290
290
// if 'next' paddle will disappear, will focus 'previous' one.
291
- if ( ! this . props . navigation && this . state . activeIndex >= this . props . items . length - 2 && ! this . props . circular ) {
291
+ if (
292
+ ! this . props . navigation &&
293
+ this . state . activeIndex >= this . props . items . length - 2 &&
294
+ ! this . props . circular
295
+ ) {
292
296
this . paddlePreviousRef . current . focus ( )
293
297
}
294
298
}
0 commit comments