mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Adds ARIA labels to page button/links
This commit is contained in:
committed by
Maikel Linke
parent
abe9032910
commit
dad9014a60
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user