Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Herst edited this page Aug 18, 2019 · 3 revisions

W014

Bootstrap v0.x

Carousel controls and indicators should use href or data-target to reference an element with class .carousel.

For proper processing of click events within a carousel, each anchor within .carousel-control should include either a href or data-target attribute with the ID of the corresponding element within the carousel.

Wrong:

<a class="left carousel-control" role="button" data-slide="prev">

Right:

<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">

Also Right:

<a class="left carousel-control" data-target="#carousel-example-generic" role="button" data-slide="prev">

Bootstrap v1.x (Bootlint for Bootstrap v4 and newer)

Carousel controls and indicators should use href or data-target to reference an element with class .carousel.

For proper processing of click events within a carousel, each anchor within .carousel-control should include either a href or data-target attribute with the ID of the corresponding element within the carousel.

Wrong:

<a class="carousel-control-prev" role="button" data-slide="prev">

Right:

<a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev">

Also Right:

<a class="left carousel-control" data-target="#carousel-example-generic" role="button" data-slide="prev">
Clone this wiki locally