nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions
https://swiperjs.com
MIT License
39.89k stars 9.74k forks source link

Swiper Pause Button #7640

Open hein-obox opened 3 months ago

hein-obox commented 3 months ago

Clear and concise description of the problem

As a website developer I expect my base slider to support accessibility standards, one of which is the pause button. See https://www.w3.org/WAI/ARIA/apg/patterns/carousel/examples/carousel-1-prev-next/.

Currently SwiperJS doesn't include such a button in the default version, and causes accessibility problems by that.

Suggested solution

We suggest to add the pause button as a default option for the SwiperJS sliders.

Steve Jones from Equalize Digital, has created a gist for how the button could be included: https://gist.github.com/SteveJonesDev/87b253a2c7109c47849fa3f0370d42a1.

Alternative

I am not sure if these buttons should always be visible for all users.

Possibly it button could only become visible, when e.g. the tab key is used on the page.

Additional context

No response

Validations

Would you like to open a PR for this feature?

SlDo commented 3 months ago

It seems that it would be better to do this either in the A11Y module, or in principle in a separate module.

hein-obox commented 3 months ago

@SlDo I am curious for the reasoning behind this. Wouldn't it be best for the swiper to support accessibility by default?

For clarification, what do you mean by the A11Y module?