Skip to content

Commit

Permalink
feat(a11y): allow disabling slideRole (#5838)
Browse files Browse the repository at this point in the history
Co-authored-by: huubl <>
  • Loading branch information
huubl authored Jul 1, 2022
1 parent 1614479 commit b376aa1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/a11y/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ export default function A11y({ swiper, extendParams, on }) {
if (params.itemRoleDescriptionMessage) {
addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage);
}
addElRole($(swiper.slides), params.slideRole);
if (params.slideRole) {
addElRole($(swiper.slides), params.slideRole);
}

const slidesLength = swiper.params.loop
? swiper.slides.filter((el) => !el.classList.contains(swiper.params.slideDuplicateClass))
Expand Down

0 comments on commit b376aa1

Please sign in to comment.