diff --git a/lib/live_beats_web/live/live_helpers.ex b/lib/live_beats_web/live/live_helpers.ex index d15cb6a..074b2f6 100644 --- a/lib/live_beats_web/live/live_helpers.ex +++ b/lib/live_beats_web/live/live_helpers.ex @@ -123,7 +123,7 @@ defmodule LiveBeatsWeb.LiveHelpers do assigns |> assign_new(:outlined, fn -> false end) |> assign_new(:class, fn -> "w-4 h-4 inline-block" end) - |> assign_new(:"aria-hidden", fn -> "true" end) + |> assign_new(:"aria-hidden", fn -> !Map.has_key?(assigns, :"aria-label") end) ~H""" <%= if @outlined do %> diff --git a/lib/live_beats_web/live/profile_live/song_row_component.ex b/lib/live_beats_web/live/profile_live/song_row_component.ex index bb044c0..b64ce73 100644 --- a/lib/live_beats_web/live/profile_live/song_row_component.ex +++ b/lib/live_beats_web/live/profile_live/song_row_component.ex @@ -18,18 +18,18 @@ defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do <%= if @status == :playing do %> - <.icon name={:volume_up} class="h-5 w-5 -mt-1 -ml-1"/> + <.icon name={:volume_up} class="h-5 w-5 -mt-1 -ml-1" aria-label="Playing" role="button"/> <% end %> <%= if @status == :paused do %> - <.icon name={:volume_up} class="h-5 w-5 -mt-1 -ml-1 text-gray-400"/> + <.icon name={:volume_up} class="h-5 w-5 -mt-1 -ml-1 text-gray-400" aria-label="Paused" role="button"/> <% end %> <%= if @status == :stopped do %> <%= if @owns_profile? do %> - <.icon name={:play} class="h-5 w-5 text-gray-400"/> + <.icon name={:play} class="h-5 w-5 text-gray-400" aria-label="Play" role="button"/> <% end %> <% end %>