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

Re-init A11y module when children changes #5692

Closed
6 tasks done
MorevM opened this issue May 4, 2022 · 0 comments
Closed
6 tasks done

Re-init A11y module when children changes #5692

MorevM opened this issue May 4, 2022 · 0 comments
Labels

Comments

@MorevM
Copy link

MorevM commented May 4, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/swiper-infinite-loop-vue-forked-vlfpw6?file=/src/App.vue

Bug description

Steps to reproduce:

  1. Click on the Prepend or Append button
  2. Check aria attributes are missed on newly added slides

It's even worse with Shuffle button - aria labels shuffled as well.

Expected Behavior

Slides should have correct aria-label's after children update

Actual Behavior

Module respects only initially set aria attributes and doesn't react to changes.

Seems it's needed to expose A11y module on Swiper params the same way as Pagination/Navigation does and do extra check for it in https://github.com/nolimits4web/swiper/blob/master/src/vue/update-swiper.js and re-init the module if children changed.

Most likely it doesn't work correctly for other frameworks as well, but I have time/interest only for Vue version.
I can do PR for Vue version if bug is really accepted.

Swiper version

8.1.4

Platform/Target and Browser Versions

Not platform/browser specific

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant