Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/solr_helpers/pagination.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def paginator(total_pages, display_range=3, aParams=params)
new_params.delete("facet.field")
if total_pages && total_pages.to_i > 1
current_page = new_params["page"] ? new_params["page"].to_i : 1
html = "<nav><ul class='pagination'>"
html = "<ul class='pagination'>"
html += page_button_previous(current_page, new_params)
html += paginator_numbers(total_pages, display_range, new_params)
html += page_button_next(current_page, total_pages, new_params)
html += "</ul></nav>"
html += "</ul>"
return html.html_safe
end
end
Expand Down Expand Up @@ -80,7 +80,7 @@ def page_button_previous(current_page, aParams)
html = ""
html += (current_page == 1) ? "<li class='disabled'>" : "<li>"
if current_page != 1
html += link_to "<span aria-hidden='true'>&laquo;</span>".html_safe, to_page(current_page-1, aParams)
html += link_to "<span aria-label='Previous Page (#{current_page-1})'>&laquo;</span>".html_safe, to_page(current_page-1, aParams)
else
# use a span instead of a link if it is inactive
html += "<span><span aria-hidden='true'>&laquo;</span></span>"
Expand All @@ -96,7 +96,7 @@ def page_button_next(current_page, total_pages, aParams)
html = ""
html += (current_page == total_pages) ? "<li class='disabled'>" : "<li>"
if current_page != total_pages
html += link_to "<span aria-hidden='true'>&raquo;</span>".html_safe, to_page(current_page+1, aParams)
html += link_to "<span aria-label='Next Page (#{current_page+1})'>&raquo;</span>".html_safe, to_page(current_page+1, aParams)
else
html += "<span><span aria-hidden='true'>&raquo;</span></span>"
end
Expand Down