Skip to content

Commit

Permalink
fix(a11y): fix focus handling
Browse files Browse the repository at this point in the history
fixes #5905
  • Loading branch information
nolimits4web committed Jul 26, 2022
1 parent 4f2e30f commit 8a3dfee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/a11y/a11y.js
Expand Up @@ -171,6 +171,11 @@ export default function A11y({ swiper, extendParams, on }) {
swiper.visibleSlides &&
swiper.visibleSlides.includes(slideEl);
if (isActive || isVisible) return;
if (swiper.isHorizontal()) {
swiper.el.scrollLeft = 0;
} else {
swiper.el.scrollTop = 0;
}
swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
};

Expand Down

0 comments on commit 8a3dfee

Please sign in to comment.