Skip to content

A11y module causes screen readers to announce every text change made inside slides #8060

@bwnn

Description

@bwnn

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-a11y-reproduction-sygtg4

Bug description

When the A11y module is used and enabled, content in slides that has dynamically updated text (such as the current video progress in video players) is always being announced to screen readers. This persists even if the user is not currently on the slide with dynamically updated text. Especially for carousels that have videos, this makes it impossible for those using screen readers to hear the video as the current progress of the video will consistently be read every second

Currently, there is no way to disable the wrapper from being a live region. While enabling autoplay will set the attribute to "off", this does not disable the announcements as "off" only indicates that announcements should occur when focus is inside the element

The reproduction has a basic carousel with videos using the video.js package. Here is a video using the reproduction and VoiceOver on mac where the video progress is announced every second (due to how video.js updates the video progress element) https://github.com/user-attachments/assets/5ae7107b-178f-4a9f-b503-496e4c1050c7

Expected Behavior

Using the A11y module should not result in dynamic text updates always being announced to screen readers

Actual Behavior

Using the A11y module results in dynamic text updates always being announced to screen readers

Swiper version

11.2.10

Platform/Target and Browser Versions

macOS, Windows

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

    t0gglesLinked to the t0ggles task

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions