Carousel accessibility improvements
Created by: ffoodd
Carousels might be improved, or at least it worths the try:
Required
-
Add a play/pause button -
Focus the selected item -
Disable prev/next controls when data-bs-wrap="false"
and stopped at one end
Nice to have
-
Progressive enhancement: adding prev/next buttons and indicators through JS - maybe at least drop them when JS is disabled?
-
Announce the current item using live region: that seems a bit too much IMHO, but hey, suggesting -
Pause on hover/focus -
Hide transitioning elements from ATs: not quite sure of the current behaviour though, might already be the case.
Docs:
-
Add link to WAI Tutorial, maybe? https://www.w3.org/WAI/tutorials/carousels/
Relates to #22549 (closed)