mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 15:41:00 +00:00
Merge pull request #20 from ndarilek/playlist-a11y
Improve playlist accessibility
This commit is contained in:
commit
ad3cab4d29
2 changed files with 4 additions and 4 deletions
|
@ -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 %>
|
||||
|
|
|
@ -18,18 +18,18 @@ defmodule LiveBeatsWeb.ProfileLive.SongRowComponent do
|
|||
<%= if @status == :playing do %>
|
||||
<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>
|
||||
<.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"/>
|
||||
</span>
|
||||
<% end %>
|
||||
<%= if @status == :paused do %>
|
||||
<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" role="button"/>
|
||||
</span>
|
||||
<% end %>
|
||||
<%= if @status == :stopped do %>
|
||||
<span class="flex relative w-6 -translate-x-1">
|
||||
<%= 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 %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue