From 851cb368580e089149ba31a09e7d770b2cb23ceb Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Wed, 15 Apr 2026 14:16:24 +0100 Subject: [PATCH] Fix dl accessibility violations on stats dashboard --- .../components/stats_components.ex | 16 +++++++--------- lib/music_library_web/live/stats_live/index.ex | 4 ++-- .../live/stats_live/index_test.exs | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/music_library_web/components/stats_components.ex b/lib/music_library_web/components/stats_components.ex index f82b6fbe..0eef8f83 100644 --- a/lib/music_library_web/components/stats_components.ex +++ b/lib/music_library_web/components/stats_components.ex @@ -76,12 +76,10 @@ defmodule MusicLibraryWeb.StatsComponents do ~H"""
-
-

- {@title} -

-
-
+

+ {@title} +

+
<.link :if={@path} navigate={@path} @@ -95,8 +93,8 @@ defmodule MusicLibraryWeb.StatsComponents do > {@count}

-
-
+
+
<.tooltip> <:content> {@tooltip} @@ -115,7 +113,7 @@ defmodule MusicLibraryWeb.StatsComponents do {@count}

- +
""" diff --git a/lib/music_library_web/live/stats_live/index.ex b/lib/music_library_web/live/stats_live/index.ex index 6d5448ba..65e3f7c4 100644 --- a/lib/music_library_web/live/stats_live/index.ex +++ b/lib/music_library_web/live/stats_live/index.ex @@ -522,7 +522,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do ~H""" <.section> <:title>{gettext("Records")} -
+
<.album_preview record={@latest_record} title={gettext("Latest purchase")} @@ -540,7 +540,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do tooltip={@scrobble_count} path={~p"/scrobbled-tracks"} /> -
+ """ end diff --git a/test/music_library_web/live/stats_live/index_test.exs b/test/music_library_web/live/stats_live/index_test.exs index b372554f..7356645f 100644 --- a/test/music_library_web/live/stats_live/index_test.exs +++ b/test/music_library_web/live/stats_live/index_test.exs @@ -68,7 +68,7 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do test "shows the wishlist total count", %{conn: conn, wishlist: wishlist} do conn |> visit("/") - |> assert_has("dd", wishlist |> length() |> Integer.to_string()) + |> assert_has("a", wishlist |> length() |> Integer.to_string()) end test "displays records for the current date in the 'On This Day' section", %{