GULP DIST
This commit is contained in:
29
dist/assets/vendor/swiper/modules/a11y/a11y.js
vendored
29
dist/assets/vendor/swiper/modules/a11y/a11y.js
vendored
@@ -111,7 +111,7 @@ export default function A11y({
|
||||
}
|
||||
|
||||
function updateNavigation() {
|
||||
if (swiper.params.loop || !swiper.navigation) return;
|
||||
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
|
||||
const {
|
||||
$nextEl,
|
||||
$prevEl
|
||||
@@ -139,23 +139,34 @@ export default function A11y({
|
||||
}
|
||||
|
||||
function hasPagination() {
|
||||
return swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
||||
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
||||
}
|
||||
|
||||
function hasClickablePagination() {
|
||||
return hasPagination() && swiper.params.pagination.clickable;
|
||||
}
|
||||
|
||||
function updatePagination() {
|
||||
const params = swiper.params.a11y;
|
||||
if (!hasPagination()) return;
|
||||
swiper.pagination.bullets.each(bulletEl => {
|
||||
const $bulletEl = $(bulletEl);
|
||||
|
||||
if (hasPagination()) {
|
||||
swiper.pagination.bullets.each(bulletEl => {
|
||||
const $bulletEl = $(bulletEl);
|
||||
if (swiper.params.pagination.clickable) {
|
||||
makeElFocusable($bulletEl);
|
||||
|
||||
if (!swiper.params.pagination.renderBullet) {
|
||||
addElRole($bulletEl, 'button');
|
||||
addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) {
|
||||
$bulletEl.attr('aria-current', 'true');
|
||||
} else {
|
||||
$bulletEl.removeAttr('aria-current');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const initNavEl = ($el, wrapperId, message) => {
|
||||
@@ -224,7 +235,7 @@ export default function A11y({
|
||||
} // Pagination
|
||||
|
||||
|
||||
if (hasPagination()) {
|
||||
if (hasClickablePagination()) {
|
||||
swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
||||
}
|
||||
}
|
||||
@@ -251,7 +262,7 @@ export default function A11y({
|
||||
} // Pagination
|
||||
|
||||
|
||||
if (hasPagination()) {
|
||||
if (hasClickablePagination()) {
|
||||
swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user