splide icon indicating copy to clipboard operation
splide copied to clipboard

custom arrow aria-label gets removed

Open luis-pato opened this issue 2 years ago • 3 comments

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

image

Reproduction Link

No response

Steps to Reproduce

  1. Create custom arrow markup
  2. Add aria-label attribute to the arrow buttons
  3. 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

luis-pato avatar Mar 14 '23 09:03 luis-pato

I’d like to know if there’s some update about this.

Abbiscuit avatar May 09 '23 10:05 Abbiscuit

I’d like to know if there’s some update about this.

Not that i know of... :(

boguz avatar May 18 '23 05:05 boguz