aboutsummaryrefslogtreecommitdiff
path: root/js/tests/visual
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2021-01-27 15:31:16 +0000
committerGitHub <[email protected]>2021-01-27 17:31:16 +0200
commit3aa3fda730ddb4d0231f4d2c83b255315f9f3684 (patch)
tree183850f61f50db2cec25436b454fedbd6755f466 /js/tests/visual
parent61391c4ee2f000685f39be9f0c7369142d54dd35 (diff)
downloadbootstrap-3aa3fda730ddb4d0231f4d2c83b255315f9f3684.tar.xz
bootstrap-3aa3fda730ddb4d0231f4d2c83b255315f9f3684.zip
Carousel: use buttons, not links, for prev/next controls (#32627)
* Carousel: use buttons, not links, for prev/next - expand the styles to neutralise border/background - change docs page - add extra unit test to check that links or buttons work as controls - modify visual test to use buttons as well - use buttons instead of links for prev/next - remove `role="button"` from links that are actually links * Clarify that controls can be button or link * Update site/content/docs/5.0/components/carousel.md Co-authored-by: Mark Otto <[email protected]> * Explicitly set padding to 0 to prevent dipping/moving on active in Firefox Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'js/tests/visual')
-rw-r--r--js/tests/visual/carousel.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tests/visual/carousel.html b/js/tests/visual/carousel.html
index 51f58e417..4658752e1 100644
--- a/js/tests/visual/carousel.html
+++ b/js/tests/visual/carousel.html
@@ -34,14 +34,14 @@
<img src="https://i.imgur.com/Nm7xoti.jpg" alt="Third slide">
</div>
</div>
- <a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-bs-slide="prev">
+ <button class="carousel-control-prev" data-bs-target="#carousel-example-generic" type="button" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
- </a>
- <a class="carousel-control-next" href="#carousel-example-generic" role="button" data-bs-slide="next">
+ </button>
+ <button class="carousel-control-next" data-bs-target="#carousel-example-generic" type="button" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
- </a>
+ </button>
</div>
</div>