From ef1355f897d27dabb06d2fde880b3f5bc63b4085 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 22 Nov 2021 13:50:20 -0600 Subject: [PATCH] Set `aria-hidden="true"` on more SVG graphics, and hide icons by default. The original icon fix assumed that the `` tag had an `alt` attribute, which it does not. Instead, SVG requires a child element to specify a description. A complete fix involves patching upstream to allow for setting this element, but since we don't seem to have actionable icons without associated textual controls, set `aria-hidden="true"` by default and require it to be overridden if needed. --- lib/live_beats_web/live/live_helpers.ex | 6 +++--- lib/live_beats_web/live/player_live.ex | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/live_beats_web/live/live_helpers.ex b/lib/live_beats_web/live/live_helpers.ex index 943a3df..41cb0c9 100644 --- a/lib/live_beats_web/live/live_helpers.ex +++ b/lib/live_beats_web/live/live_helpers.ex @@ -31,7 +31,7 @@ defmodule LiveBeatsWeb.LiveHelpers do >
- + @@ -111,7 +111,7 @@ defmodule LiveBeatsWeb.LiveHelpers do def spinner(assigns) do ~H""" - + @@ -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(:alt, fn -> "" end) + |> assign_new(:"aria-hidden", fn -> "true" end) ~H""" <%= if @outlined do %> diff --git a/lib/live_beats_web/live/player_live.ex b/lib/live_beats_web/live/player_live.ex index ef3d394..c8fc48b 100644 --- a/lib/live_beats_web/live/player_live.ex +++ b/lib/live_beats_web/live/player_live.ex @@ -50,7 +50,7 @@ defmodule LiveBeatsWeb.PlayerLive do @@ -59,12 +59,12 @@ defmodule LiveBeatsWeb.PlayerLive do