diff --git a/app/components/shared/link_list_component.rb b/app/components/shared/link_list_component.rb index 3a9a21b68..ccfc97b69 100644 --- a/app/components/shared/link_list_component.rb +++ b/app/components/shared/link_list_component.rb @@ -17,7 +17,15 @@ class Shared::LinkListComponent < ApplicationComponent end def list_items - present_links.map do |text, url, current = false, **link_options| + present_links.map do |text, url, current_or_options = false, options = {}| + if current_or_options.is_a?(Hash) + current = false + link_options = current_or_options + else + current = current_or_options + link_options = options + end + tag.li("aria-current": (true if current)) do if url link_to text, url, link_options