* Initializes slides as navigation.
()
| 144 | * Initializes slides as navigation. |
| 145 | */ |
| 146 | function initNavigation(): void { |
| 147 | const controls = Splide.splides.map( target => { |
| 148 | const Slide = target.splide.Components.Slides.getAt( index ); |
| 149 | return Slide ? Slide.slide.id : ''; |
| 150 | } ).join( ' ' ); |
| 151 | |
| 152 | setAttribute( slide, ARIA_LABEL, format( i18n.slideX, ( isClone ? slideIndex : index ) + 1 ) ); |
| 153 | setAttribute( slide, ARIA_CONTROLS, controls ); |
| 154 | setAttribute( slide, ROLE, slideFocus ? 'button' : '' ); |
| 155 | slideFocus && removeAttribute( slide, ARIA_ROLEDESCRIPTION ); |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * If the `updateOnMove` option is `true`, called when the slider starts moving. |
nothing calls this directly
no test coverage detected
searching dependent graphs…