You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Affected code is shown here:
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.
Kind of related to this issue: I'm wondering why the div-element is used (as "recommended" in the docs) for the navigation buttons instead of the button-element? Wouldn't it be semantically correct to use the button-element? It may be beneficial for accessibility.
Check that this is really a bug
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.
Affected code is shown here:
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
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: