Skip to content

Commit 87af1f0

Browse files
committed
Fix accessibility problems with the search pagination
The problem was that the next/prev links didn't have any text. For some reason, the pagination markup on this page was different than, say, that in crates.hbs. We really should fix rust-lang#8 for real someday 😂
1 parent d85aabb commit 87af1f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/templates/search.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@
7979
{{/each}}
8080
</div>
8181

82-
<div class='pagination'>
83-
<LinkTo @query={{hash page=this.prevPage}} class="prev">
82+
<nav class='pagination' aria-label="Pagination navigation">
83+
<LinkTo @query={{hash page=this.prevPage}} class="prev" rel="prev" title="previous page" data-test-pagination-prev>
8484
{{svg-jar "left-pag"}}
8585
</LinkTo>
8686
{{#each this.pages as |page|}}
87-
<LinkTo @query={{hash page=page}}>{{ page }}</LinkTo>
87+
<LinkTo @query={{hash page=page}} @title={{concat "Go to page " page}}>{{ page }}</LinkTo>
8888
{{/each}}
89-
<LinkTo @query={{hash page=this.nextPage}} class="next">
89+
<LinkTo @query={{hash page=this.nextPage}} class="next" rel="next" title="next page" data-test-pagination-next>
9090
{{svg-jar "right-pag"}}
9191
</LinkTo>
92-
</div>
92+
</nav>
9393
{{else}}
9494
<div id="no-results">
9595
<h2>0 crates found. <a href='https://doc.rust-lang.org/cargo/getting-started/'>Get started</a> and create your own.</h2>

0 commit comments

Comments
 (0)