From b32edd581d2c2d289e32d089e23bae94aa7cdf8e Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 19 Mar 2023 12:35:26 -0400 Subject: [PATCH] fix accessibility issues --- CHANGELOG.md | 1 + .../components/ammo_group_table_component.ex | 2 +- .../components/ammo_type_table_component.ex | 2 +- .../components/container_table_component.ex | 2 +- .../core_components/topbar.html.heex | 4 +- .../components/move_ammo_group_component.ex | 2 +- .../components/shot_group_table_component.ex | 2 +- .../live/ammo_group_live/index.html.heex | 1 + lib/cannery_web/live/ammo_group_live/show.ex | 2 +- .../live/ammo_type_live/index.html.heex | 1 + .../live/container_live/index.html.heex | 1 + .../live/range_live/index.html.heex | 1 + lib/cannery_web/live/tag_live/index.html.heex | 1 + .../templates/user_settings/edit.html.heex | 6 +-- priv/gettext/actions.pot | 54 +++++++++---------- priv/gettext/de/LC_MESSAGES/actions.po | 54 +++++++++---------- priv/gettext/de/LC_MESSAGES/default.po | 46 +++++++++++----- priv/gettext/de/LC_MESSAGES/prompts.po | 12 ++--- priv/gettext/default.pot | 46 +++++++++++----- priv/gettext/en/LC_MESSAGES/actions.po | 54 +++++++++---------- priv/gettext/en/LC_MESSAGES/default.po | 46 +++++++++++----- priv/gettext/en/LC_MESSAGES/prompts.po | 12 ++--- priv/gettext/es/LC_MESSAGES/actions.po | 54 +++++++++---------- priv/gettext/es/LC_MESSAGES/default.po | 46 +++++++++++----- priv/gettext/es/LC_MESSAGES/prompts.po | 12 ++--- priv/gettext/fr/LC_MESSAGES/actions.po | 54 +++++++++---------- priv/gettext/fr/LC_MESSAGES/default.po | 46 +++++++++++----- priv/gettext/fr/LC_MESSAGES/prompts.po | 12 ++--- priv/gettext/ga/LC_MESSAGES/actions.po | 54 +++++++++---------- priv/gettext/ga/LC_MESSAGES/default.po | 46 +++++++++++----- priv/gettext/ga/LC_MESSAGES/prompts.po | 12 ++--- priv/gettext/prompts.pot | 12 ++--- 32 files changed, 414 insertions(+), 286 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ddcfd..ff5df7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Add link in readme to github mirror - Fix tables unable to sort on empty dates - Only show historical ammo type information when displaying "Show used" +- Fix even more accessibility issues # v0.8.4 - Improve accessibility diff --git a/lib/cannery_web/components/ammo_group_table_component.ex b/lib/cannery_web/components/ammo_group_table_component.ex index fb5459a..6408ce9 100644 --- a/lib/cannery_web/components/ammo_group_table_component.ex +++ b/lib/cannery_web/components/ammo_group_table_component.ex @@ -51,7 +51,7 @@ defmodule CanneryWeb.Components.AmmoGroupTableComponent do if actions == [] do [] else - [%{label: nil, key: :actions, sortable: false}] + [%{label: gettext("Actions"), key: :actions, sortable: false}] end columns = [ diff --git a/lib/cannery_web/components/ammo_type_table_component.ex b/lib/cannery_web/components/ammo_type_table_component.ex index ec36e76..f362e6e 100644 --- a/lib/cannery_web/components/ammo_type_table_component.ex +++ b/lib/cannery_web/components/ammo_type_table_component.ex @@ -118,7 +118,7 @@ defmodule CanneryWeb.Components.AmmoTypeTableComponent do ) |> Kernel.++([ %{label: gettext("Average CPR"), key: :avg_price_paid, type: :avg_price_paid}, - %{label: nil, key: "actions", type: :actions, sortable: false} + %{label: gettext("Actions"), key: "actions", type: :actions, sortable: false} ]) round_counts = ammo_types |> Ammo.get_round_count_for_ammo_types(current_user) diff --git a/lib/cannery_web/components/container_table_component.ex b/lib/cannery_web/components/container_table_component.ex index 86379ff..1005aba 100644 --- a/lib/cannery_web/components/container_table_component.ex +++ b/lib/cannery_web/components/container_table_component.ex @@ -64,7 +64,7 @@ defmodule CanneryWeb.Components.ContainerTableComponent do %{label: gettext("Packs"), key: :packs, type: :integer}, %{label: gettext("Rounds"), key: :rounds, type: :integer}, %{label: gettext("Tags"), key: :tags, type: :tags}, - %{label: nil, key: :actions, sortable: false, type: :actions} + %{label: gettext("Actions"), key: :actions, sortable: false, type: :actions} ]) extra_data = %{ diff --git a/lib/cannery_web/components/core_components/topbar.html.heex b/lib/cannery_web/components/core_components/topbar.html.heex index a77e281..82a1523 100644 --- a/lib/cannery_web/components/core_components/topbar.html.heex +++ b/lib/cannery_web/components/core_components/topbar.html.heex @@ -1,4 +1,4 @@ -