Accessibility: Convey selected state of filters on Follows and followers page (#39134)

This commit is contained in:
diondiondion 2026-05-22 11:23:37 +02:00 committed by GitHub
parent fd4a9c25dd
commit ae8b794c66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,8 +20,9 @@ module Admin::FilterHelper
def filter_link_to(text, link_to_params, link_class_params = link_to_params)
new_url = filtered_url_for(link_to_params)
new_class = filtered_url_for(link_class_params)
is_selected = selected?(link_class_params)
link_to text, new_url, class: filter_link_class(new_class)
link_to text, new_url, class: filter_link_class(new_class), 'aria-current': (is_selected ? 'true' : nil)
end
def table_link_to(icon, text, path, **options)