splide
splide copied to clipboard
custom arrow aria-label gets removed
Checks
- [X] Not a duplicate.
- [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
v4.1.4
Description
The aria-label attribute is getting removed from my custom arrows markup.
I am creating custom arrows for the slider with the following markup:
<div class="splide slider__slider">
<div class="splide__arrows slider-controls">
<button class="splide__arrow splide__arrow--prev slider-control slider-control--prev" aria-label="Previous slide">
<!-- svg icon -->
</button>
<button class="splide__arrow splide__arrow--next slider-control slider-control--next" aria-label="Next slide">
<!-- svg icon -->
</button>
</div>
<div class="splide__track slider__track">
<!-- my images -->
</div>
</div>
I expected the buttons to have the aria-label="Previous slide" on the frontend, but they don't. They have the aria-controls="..." attribute (which is added automatically), but not the aria-label which i define on my template

Reproduction Link
No response
Steps to Reproduce
- Create custom arrow markup
- Add
aria-labelattribute to the arrow buttons - Open the slider on a browser
Expected Behaviour
I expected to see my aria-label attributes on the FE if i define them on my custom arrows markup
I’d like to know if there’s some update about this.
I’d like to know if there’s some update about this.
Not that i know of... :(