Skip to content

Commit

Permalink
Remove redundant visually hidden "(current)" from pagination controls (
Browse files Browse the repository at this point in the history
…#31892)

* Replace visually hidden span with aria-current in tests

* Remove redundant visually hidden "(current)" when `aria-current` already used

Closes #31891
  • Loading branch information
patrickhlauke authored and XhmikosR committed Oct 26, 2020
1 parent 43ce595 commit e5fdb10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion js/tests/visual/dropdown.html
Expand Up @@ -19,7 +19,7 @@ <h1>Dropdown <small>Bootstrap Visual Test</small></h1>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
<a class="nav-link" href="#" aria-current="page">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
Expand Down
2 changes: 1 addition & 1 deletion js/tests/visual/modal.html
Expand Up @@ -19,7 +19,7 @@
<a class="navbar-brand" href="#">This shouldn't jump!</a>
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
<a class="nav-link" href="#" aria-current="page">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
Expand Down
17 changes: 4 additions & 13 deletions site/docs/4.5/components/pagination.md
Expand Up @@ -64,7 +64,7 @@ While the `.disabled` class uses `pointer-events: none` to _try_ to disable the
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item active" aria-current="page">
<a class="page-link" href="#">2 <span class="sr-only">(current)</span></a>
<a class="page-link" href="#">2</a>
</li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
Expand All @@ -85,10 +85,7 @@ You can optionally swap out active or disabled anchors for `<span>`, or omit the
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item active" aria-current="page">
<span class="page-link">
2
<span class="sr-only">(current)</span>
</span>
<span class="page-link">2</span>
</li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
Expand All @@ -107,10 +104,7 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
<nav aria-label="...">
<ul class="pagination pagination-lg">
<li class="page-item active" aria-current="page">
<span class="page-link">
1
<span class="sr-only">(current)</span>
</span>
<span class="page-link">1</span>
</li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
Expand All @@ -123,10 +117,7 @@ Fancy larger or smaller pagination? Add `.pagination-lg` or `.pagination-sm` for
<nav aria-label="...">
<ul class="pagination pagination-sm">
<li class="page-item active" aria-current="page">
<span class="page-link">
1
<span class="sr-only">(current)</span>
</span>
<span class="page-link">1</span>
</li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
Expand Down

0 comments on commit e5fdb10

Please sign in to comment.