forked from shibao/cannery
fix accessibility issues
This commit is contained in:
@ -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 = [
|
||||
|
@ -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)
|
||||
|
@ -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 = %{
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
@ -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 =
|
||||
|
@ -54,6 +54,7 @@
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search ammo")
|
||||
) %>
|
||||
|
@ -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)
|
||||
|
@ -29,6 +29,7 @@
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search catalog")
|
||||
) %>
|
||||
|
@ -29,6 +29,7 @@
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search containers")
|
||||
) %>
|
||||
|
@ -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")
|
||||
) %>
|
||||
|
@ -32,6 +32,7 @@
|
||||
<%= text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("Search tags")
|
||||
) %>
|
||||
|
@ -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?()}
|
||||
|
Reference in New Issue
Block a user