macro-carousel
macro-carousel copied to clipboard
[a11y] DOM order doesn't reflect the layout order when infinite-looping
- enable
loopand setslides-per-view="2" - select the last slide. The slides in view are now the last slide and the first slide
- notice how tab order (and screen readers) consume first the content of the first slide, then the content of the last slide, instead of following the layout position of the slides.
This is because DOM order is followed
Possible solution: set the CSS order property to each slide (as they are in a flexbox container).
Then, at transitionend time, move the slide's DOM around to reflect the layout order.