fix accessibility issues
All checks were successful
continuous-integration/drone/push Build is passing

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 =

View File

@ -54,6 +54,7 @@
<%= text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("Search ammo")
) %>

View File

@ -91,7 +91,7 @@ defmodule CanneryWeb.AmmoGroupLive.Show 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}
]
shot_groups = ActivityLog.list_shot_groups_for_ammo_group(ammo_group, current_user)

View File

@ -29,6 +29,7 @@
<%= text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("Search catalog")
) %>

View File

@ -29,6 +29,7 @@
<%= text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("Search containers")
) %>

View File

@ -86,6 +86,7 @@
<%= text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("Search shot records")
) %>

View File

@ -32,6 +32,7 @@
<%= text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("Search tags")
) %>

View File

@ -107,9 +107,9 @@
action={Routes.user_settings_path(@conn, :update)}
class="flex flex-col space-y-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4 justify-center items-center"
>
<h3 class="title text-primary-600 text-lg text-center col-span-3">
<%= dgettext("actions", "Change Language") %>
</h3>
<%= label(f, :locale, dgettext("actions", "Change Language"),
class: "title text-primary-600 text-lg text-center col-span-3"
) %>
<div
:if={@locale_changeset.action && not @locale_changeset.valid?()}