macro-carousel icon indicating copy to clipboard operation
macro-carousel copied to clipboard

[a11y] DOM order doesn't reflect the layout order when infinite-looping

Open ciampo opened this issue 8 years ago • 1 comments

  • enable loop and set slides-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

ciampo avatar Jan 15 '18 11:01 ciampo

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.

ciampo avatar Jan 15 '18 11:01 ciampo