Adds ARIA labels to page button/links

This commit is contained in:
Marin @Home
2025-11-11 12:45:18 -05:00
committed by Maikel Linke
parent abe9032910
commit dad9014a60
2 changed files with 3 additions and 2 deletions

View File

@@ -13,11 +13,11 @@
- pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
- if item.is_a?(Integer) # page link
%li
%a.page{ data: { action: 'click->search#changePage', page: item } }= item
%a.page{ "aria-label": t('.page', number: item), data: { action: 'click->search#changePage', page: item } }= item
- elsif item.is_a?(String) # current page
%li
%a.page.current.active{"aria-current": "page"}= item
%a.page.current.active{"aria-label": t('.page', number: item), "aria-current": "page"}= item
- elsif item == :gap # page gap
%li

View File

@@ -1858,6 +1858,7 @@ en:
web: "Web Resources"
stimulus_pagination:
navigation: Pagination
page: "Page %{number}"
enterprise_issues:
create_new: Create New
resend_email: Resend Email