Skip to content

Conversation

@farseekers
Copy link

The a11y documentation says that it accepts a boolean,

https://swiperjs.com/swiper-api#param-a11y

Object with a11y parameters or boolean true to enable with default settings.

but the type definition does not support this.

a11y?: A11yOptions;

This PR adds it, mirroring the behaviour of autoplay

* Object with autoplay parameters or boolean `true` to enable with default settings
*
* @example
* ```js
* const swiper = new Swiper('.swiper', {
* autoplay: {
* delay: 5000,
* },
*});
* ```
*/
autoplay?: AutoplayOptions | boolean;

@farseekers farseekers changed the title Support boolean as a11y value Support boolean as a11y type Feb 1, 2026
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

Successfully merging this pull request may close these issues.

1 participant