From dad9014a606b6c90e55e73968d41b17d28fd6257 Mon Sep 17 00:00:00 2001 From: "Marin @Home" Date: Tue, 11 Nov 2025 12:45:18 -0500 Subject: [PATCH] Adds ARIA labels to page button/links --- app/views/admin/shared/_stimulus_pagination.html.haml | 4 ++-- config/locales/en.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/admin/shared/_stimulus_pagination.html.haml b/app/views/admin/shared/_stimulus_pagination.html.haml index b5c3055727..0c927b7767 100644 --- a/app/views/admin/shared/_stimulus_pagination.html.haml +++ b/app/views/admin/shared/_stimulus_pagination.html.haml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 3752c1b8f7..700ba63144 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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