Skip to content

Commit

Permalink
Fixed broken aria-label for disabled links in Foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-rikowski committed Apr 10, 2024
1 parent c5280f5 commit 1677b03
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
8 changes: 4 additions & 4 deletions gem/lib/pagy/extras/foundation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ def foundation_prev_html(pagy, a)
if (p_prev = pagy.prev)
%(<li class="prev">#{a.(p_prev, pagy_t('pagy.prev'), aria_label: pagy_t('pagy.aria_label.prev'))}</li>)
else
%(<li class="prev disabled" role="link" aria-disabled="true" #{
pagy_t('pagy.aria_label.prev')}>#{pagy_t('pagy.prev')}</li>)
%(<li class="prev disabled" role="link" aria-disabled="true" aria-label="#{
pagy_t('pagy.aria_label.prev')}">#{pagy_t('pagy.prev')}</li>)
end
end

def foundation_next_html(pagy, a)
if (p_next = pagy.next)
%(<li class="next">#{a.(p_next, pagy_t('pagy.next'), aria_label: pagy_t('pagy.aria_label.next'))}</li>)
else
%(<li class="next disabled" role="link" aria-disabled="true" #{
pagy_t('pagy.aria_label.next')}>#{pagy_t('pagy.next')}</li>)
%(<li class="next disabled" role="link" aria-disabled="true" aria-label="#{
pagy_t('pagy.aria_label.next')}">#{pagy_t('pagy.next')}</li>)
end
end
end
Expand Down
Loading

0 comments on commit 1677b03

Please sign in to comment.