-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Check that this is really a bug
- I confirm
Reproduction link
https://codesandbox.io/p/sandbox/swiper-navigation-forked-yw4g5x?file=%2Findex.html
Bug description
Next/Prev navigation buttons (.swiper-button-prev and swiper-button-next) don't work when keyboard is used to navigate. This is needed to navigate the swiper carousel for Accessibility - currently keyboard/assistive tech users can't access the carousel.
To replicate, go to the Reproduction link (this is direct fork of navigation demo, no adjustments), use keyboard "tab" key to focus swiper arrow, once in focus press keyboard "Enter/Return" key.
Small tweak to code fixes the issue...

Expected Behavior
Pressing Enter key when next/prev arrows are in focus should trigger the carousel to slide.
Actual Behavior
Pressing Enter key when next/prev arrows are in focus does nothing.
Swiper version
11.0.7
Platform/Target and Browser Versions
MacOS Chrome 122.0.6261.139
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- I'm willing to open a PR
