Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiper.update() does not add aria-label #7757

Open
6 tasks done
jonnitto opened this issue Oct 5, 2024 · 0 comments
Open
6 tasks done

swiper.update() does not add aria-label #7757

jonnitto opened this issue Oct 5, 2024 · 0 comments

Comments

@jonnitto
Copy link

jonnitto commented Oct 5, 2024

Check that this is really a bug

  • I confirm

Reproduction link

https://codepen.io/jonnitto/pen/MWNeowV/888093ea5782303c4e5c4abd87fb6eeb

Bug description

I use swiper in a CMS where the slide can get updated from the markup. But if I run swiper.update() afterwards, the aria-label will not be added. But I use this value to go to the slide if a user clicks on the content element on the content tree (which is outside of the preview frame).

In the CodePen link you'll see, if you remove the aria-labels and click on swiper.update(), the labels will not get added again.

I also added a workaround as an example:

swiper.prependSlide('<div class="swiper-slide"></div>');
swiper.removeSlide(0);

Expected Behavior

The aria-label will get added again

Actual Behavior

The aria-label is missing

Swiper version

11.1.14

Platform/Target and Browser Versions

macOS 15.0.1, in every Browser (Chrome, Safari, etc.) always the newest version

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR, but I need help where to start 😉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant