I have a number of paginated items and when the next numbered page and the next
button are the same, then the wave accesibility tool raises an alert about redundant links that point to the same URL. Can this be resolved or should I ignore it? An example of my pagination code is below.
See page 2
and next
where the links are similar below for the issue in question.
<nav class="pagination" aria-label="Pagination">
<ul>
<li>
<a href="/1/"
aria-label="Page 1"
aria-current="page">
1
</a>
</li>
<li><a href="/2/" aria-label="Page 2">2</a></li>
<li><a href="/3/" aria-label="Page 3">3</a></li>
<li><a href="/4/" aria-label="Page 4">4</a></li>
<li><a href="/5/" aria-label="Page 5">5</a></li>
<li><a href="/2/">Next</a></li>
</ul>
</nav>
It can be ignored. As @andy says in his comment, this is more of a warning than a failure. In general, it's best to not have adjacent links go to the same destination but it's not a WCAG failure.
In your code example, the links are not adjacent. They're not "next" to each other in the DOM. There are several links in between the "2" link and the "Next" link so I'm not sure why it would be flagged as an issue anyway.
If I copy/paste your code into a demo and run WAVE, it does not flag the "Next" link as redundant. But if I change the "Next" link to point to the same destination as the "5" link, then I do get the redundant warning since the links are indeed adjacent to each other.
One might argue that the "2" link and the "Next" link fail WCAG 3.2.4 Consistent Identification since you have two links that go to the same destination but they're not labeled the same, but in your case, it makes sense that they have different names so I wouldn't fail 3.2.4 if I were doing an accessibility review.