mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-25 17:30:59 +00:00
If an icon has aria-label
set, don't set aria-hidden
. Also, label some icons.
This commit is contained in:
parent
c8a6035a02
commit
3860c79ec7
2 changed files with 4 additions and 4 deletions
|
@ -123,7 +123,7 @@ defmodule LiveBeatsWeb.LiveHelpers do
|
||||||
assigns
|
assigns
|
||||||
|> assign_new(:outlined, fn -> false end)
|
|> assign_new(:outlined, fn -> false end)
|
||||||
|> assign_new(:class, fn -> "w-4 h-4 inline-block" 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"""
|
~H"""
|
||||||
<%= if @outlined do %>
|
<%= if @outlined do %>
|
||||||
|
|
|
@ -18,18 +18,18 @@ defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do
|
||||||
<%= if @status == :playing do %>
|
<%= if @status == :playing do %>
|
||||||
<span class="flex pt-1 relative mr-2 w-4">
|
<span class="flex pt-1 relative mr-2 w-4">
|
||||||
<span class="w-3 h-3 animate-ping bg-purple-400 rounded-full absolute"></span>
|
<span class="w-3 h-3 animate-ping bg-purple-400 rounded-full absolute"></span>
|
||||||
<.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"/>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= if @status == :paused do %>
|
<%= if @status == :paused do %>
|
||||||
<span class="flex pt-1 relative mr-2 w-4">
|
<span class="flex pt-1 relative mr-2 w-4">
|
||||||
<.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"/>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= if @status == :stopped do %>
|
<%= if @status == :stopped do %>
|
||||||
<span class="flex relative w-6 -translate-x-1">
|
<span class="flex relative w-6 -translate-x-1">
|
||||||
<%= if @owns_profile? 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"/>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue