Skip to content

Using tabbing with a11y module whilst using virtual module breaks position of elements #8147

@BillGeoghegan

Description

@BillGeoghegan

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/devbox/swiper-react-demo-forked-ckwctf?workspaceId=ws_8WC3YL2Rvy9rz6wusNu4z9

Bug description

When using the a11y module and virtual module together, keyboard navigation works at first but as you navigate further, it appears to eventually breaks the position of the elements by not swiping to the next slide on time.

Video attached below. I tested on Chrome and Firefox and can consistently reproduce the issue on both browsers using latest version. I also tested one version down to check if it was a regression but it was present there too.
https://github.com/user-attachments/assets/39f22c3b-6c4f-4e3c-a76a-c599d4e936a7

I attempted to manually trigger a virtual.update, but it doesn't appear to have made a difference.

Expected Behavior

You can keep tabbing to reach all elements in the slider.

Actual Behavior

After a certain point, tabbing to the next element will reposition the items, rather than maintaining the position within a slide. This breaks grouping and the perceived position of buttons.

Swiper version

12.0.3

Platform/Target and Browser Versions

MacOS Chrome v143.0.7499.193

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions