diff --git a/app/assets/stylesheets/filters.css b/app/assets/stylesheets/filters.css index baa876e96..b72f91cfd 100644 --- a/app/assets/stylesheets/filters.css +++ b/app/assets/stylesheets/filters.css @@ -133,14 +133,6 @@ } .quick-filter { - .checked { - display: none; - } - - [aria-checked="true"] .checked { - display: block; - } - &:has([aria-checked="true"]):not(.quick-filter--with-default) { .input--select { --input-background: var(--color-selected); diff --git a/app/assets/stylesheets/popup.css b/app/assets/stylesheets/popup.css index 94c6b9d60..6dd0050c5 100644 --- a/app/assets/stylesheets/popup.css +++ b/app/assets/stylesheets/popup.css @@ -113,6 +113,14 @@ } } + .checked { + display: none; + } + + &[aria-checked="true"] .checked { + display: block; + } + &[aria-selected] { background-color: var(--color-selected); @@ -137,14 +145,6 @@ max-inline-size: 100%; padding: var(--inline-space-half) var(--popup-item-padding-inline); text-align: start; - - .icon.current { - display: none; - - .popup__item--current & { - display: block; - } - } } .popup__icon { diff --git a/app/helpers/filters_helper.rb b/app/helpers/filters_helper.rb index 13994f1eb..cfb634223 100644 --- a/app/helpers/filters_helper.rb +++ b/app/helpers/filters_helper.rb @@ -17,11 +17,11 @@ module FiltersHelper def filter_place_menu_item(path, label, icon, new_window: false, current: false) link_to_params = new_window ? { target: "_blank" } : {} - tag.li class: [ "popup__item", { "popup__item--current": current } ], id: "filter-place-#{label.parameterize}", data: { filter_target: "item", navigable_list_target: "item" } do + tag.li class: "popup__item", id: "filter-place-#{label.parameterize}", data: { filter_target: "item", navigable_list_target: "item" }, aria: { checked: current } do concat icon_tag(icon, class: "popup__icon") concat(link_to(path, link_to_params.merge(class: "popup__btn btn")) do concat tag.span(label, class: "overflow-ellipsis") - concat icon_tag("check", class: "current flex-item-justify-end", "aria-hidden": true) + concat icon_tag("check", class: "checked flex-item-justify-end", "aria-hidden": true) end) end end