You are viewing version 6.0.0 of the library, the latest version is
<!--Carousel Wrapper-->
<div id="carousel-example" class="carousel slide carousel-fade" data-ride="carousel">
    <!--Indicators-->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example" data-slide-to="1"></li>
        <li data-target="#carousel-example" data-slide-to="2"></li>
        <li class="carousel-play-pause">
            <button type="button" class="carousel-control-pause">
                <span class="mdi mdi-pause" aria-hidden="true"></span>
                <span class="sr-only">Pauzeer slideshow</span>
            </button>
            <button type="button" class="carousel-control-play" aria-hidden="true" style="display: none;">
                <span class="mdi mdi-play play" aria-hidden="true"></span>
                <span class="sr-only">Speel slideshow af</span>
            </button>
        </li>
    </ol>
    <!--/.Indicators-->
    <!--Slides-->
    <ul class="carousel-inner">
        <!--First slide-->
        <li class="carousel-item active">
            <img src="https://mdbootstrap.com/img/Photos/Slides/img%20(18).jpg" alt="Eerste slide">
        </li>
        <!--/First slide-->
        <!--Second slide-->
        <li class="carousel-item">
            <img src="https://mdbootstrap.com/img/Photos/Slides/img%20(19).jpg" alt="Tweede slide">
        </li>
        <!--/Second slide-->
        <!--Third slide-->
        <li class="carousel-item">
            <img src="https://mdbootstrap.com/img/Photos/Slides/img%20(20).jpg" alt="Derde slide">
        </li>
        <!--/Third slide-->
    </ul>
    <!--/.Slides-->
    <a class="carousel-control-prev" href="#carousel-example" role="button" data-slide="prev">
        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Vorige slide</span>
    </a>
    <a class="carousel-control-next" href="#carousel-example" role="button" data-slide="next">
        <span class="carousel-control-next-icon" aria-hidden="true"></span>
        <span class="sr-only">Volgende slide</span>
    </a>
</div>

Based on the version from MDB:
https://mdbootstrap.com/javascript/carousel/

With custom play/pause addition.

Accessibility

Regarding the alt attribute on the images, please follow the decision tree as can be seen here https://www.w3.org/WAI/tutorials/images/decision-tree/

Using

To start using this component, some JavaScript is needed to initialize it.
Underneath a jQuery example with the play/pause addition and should be placed in the Additional component(s) script section as documented in How to use.

<script>
    var carousel = new nijmegen.Carousel();
    $('document').ready(function () {
        carousel.init('.carousel');
    });
</script>

Notes

  • MDB carousel by default starts sliding through the available slides, therefor a play/pause functionality has been added on top of the component to comply to the first bullet point in *”What makes a carousel accessible”* (https://www.w3.org/WAI/tutorials/carousels/)