About This Demo
This carousel contains a mix of accessible and inaccessible slides.
Some slides are purely decorative (empty <div>s
with CSS backgrounds), some have images without alt text, and some
have proper accessible content. The FixCarousel
extraction logic automatically skips slides that lack accessible
content (no text, no alt on images, no
aria-label).
Mixed Content Carousel (7 slides, only 4 accessible)
⚠ Contains Empty/Decorative SlidesPortal Component Fixes Code
Standard extraction — empty slides are filtered automatically by checkAccessibleContent().
fixCarousel('#mixed-carousel-1', '.carousel-slide')
.carouselLabel('Mixed Content Gallery')
How to Test
- Press Tab to reach the trigger button, then Enter to open the carousel modal.
- The modal should show 4 slides (not 7). Slides 2, 4, and 6 are decorative/empty and should be skipped.
-
Navigate with ← / → and verify:
- Slide 1: mountain river image
- Slide 2: "Accessibility First" text
- Slide 3: woman with laptop + "Learn More" link
- Slide 4: "10M+" statistics (aria-label)
-
Open DevTools console — look for
[FixCarousel] Slide N has no accessible content, skippingmessages for slides 2, 4, and 6.