fix accessibility issues

This commit is contained in:
2023-03-19 12:35:26 -04:00
parent 2e372ca2ab
commit b32edd581d
32 changed files with 414 additions and 286 deletions

View File

@ -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 = [

View File

@ -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)

View File

@ -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 = %{

View File

@ -1,4 +1,4 @@
<nav role="navigation" class="mb-8 px-8 py-4 w-full bg-primary-400">
<nav role="navigation" class="mb-8 px-8 py-4 w-full bg-primary-500">
<div class="flex flex-col sm:flex-row justify-between items-center">
<div class="mb-4 sm:mb-0 sm:mr-8 flex flex-row justify-start items-center space-x-2">
<.link
@ -87,6 +87,7 @@
href={Routes.user_session_path(Endpoint, :delete)}
method="delete"
data-confirm={dgettext("prompts", "Are you sure you want to log out?")}
aria-label={gettext("Log out")}
>
<i class="fas fa-sign-out-alt"></i>
</.link>
@ -101,6 +102,7 @@
<.link
navigate={Routes.live_dashboard_path(Endpoint, :home)}
class="text-white hover:underline"
aria-label={gettext("Live Dashboard")}
>
<i class="fas fa-gauge"></i>
</.link>

View File

@ -67,7 +67,7 @@ defmodule CanneryWeb.Components.MoveAmmoGroupComponent do
%{label: gettext("Container"), key: :name},
%{label: gettext("Type"), key: :type},
%{label: gettext("Location"), key: :location},
%{label: nil, key: :actions, sortable: false}
%{label: gettext("Actions"), key: :actions, sortable: false}
]
rows = containers |> get_rows_for_containers(assigns, columns)

View File

@ -42,7 +42,7 @@ defmodule CanneryWeb.Components.ShotGroupTableComponent do
%{label: gettext("Rounds shot"), key: :count},
%{label: gettext("Notes"), key: :notes},
%{label: gettext("Date"), key: :date, type: ComparableDate},
%{label: nil, key: :actions, sortable: false}
%{label: gettext("Actions"), key: :actions, sortable: false}
]
ammo_groups =