fix(a11y): WCAG 2 AA contrast and keyboard access
This commit is contained in:
parent
e4e6cfdd47
commit
a23f999eee
6 changed files with 43 additions and 4 deletions
|
|
@ -99,6 +99,25 @@
|
||||||
/* Make LiveView wrapper divs transparent for layout */
|
/* Make LiveView wrapper divs transparent for layout */
|
||||||
[data-phx-session] { display: contents }
|
[data-phx-session] { display: contents }
|
||||||
|
|
||||||
|
/* WCAG 1.4.12 Text Spacing: allow user stylesheets to adjust text spacing in popovers.
|
||||||
|
Popover content (e.g. from DaisyUI dropdown) must not rely on non-overridable inline
|
||||||
|
spacing; use inherited values so custom stylesheets can override. */
|
||||||
|
[popover] {
|
||||||
|
line-height: inherit;
|
||||||
|
letter-spacing: inherit;
|
||||||
|
word-spacing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* WCAG 2 AA: success/error text on light backgrounds (e.g. base-200). Use instead of
|
||||||
|
text-success/text-error when contrast ratio of theme colors is insufficient. */
|
||||||
|
.text-success-aa {
|
||||||
|
color: oklch(0.35 0.12 165);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-error-aa {
|
||||||
|
color: oklch(0.45 0.2 25);
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================
|
/* ============================================
|
||||||
Sidebar Base Styles
|
Sidebar Base Styles
|
||||||
============================================ */
|
============================================ */
|
||||||
|
|
|
||||||
|
|
@ -366,9 +366,9 @@ defmodule MvWeb.GlobalSettingsLive do
|
||||||
<div class="mt-4 p-4 rounded-lg border border-base-300 bg-base-200 space-y-2">
|
<div class="mt-4 p-4 rounded-lg border border-base-300 bg-base-200 space-y-2">
|
||||||
<p class="font-medium">
|
<p class="font-medium">
|
||||||
{gettext("Last sync result:")}
|
{gettext("Last sync result:")}
|
||||||
<span class="text-success ml-1">{gettext("%{count} synced", count: @result.synced)}</span>
|
<span class="text-success-aa ml-1">{gettext("%{count} synced", count: @result.synced)}</span>
|
||||||
<%= if @result.errors != [] do %>
|
<%= if @result.errors != [] do %>
|
||||||
<span class="text-error ml-1">
|
<span class="text-error-aa ml-1">
|
||||||
{gettext("%{count} failed", count: length(@result.errors))}
|
{gettext("%{count} failed", count: length(@result.errors))}
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ defmodule MvWeb.MemberLive.Show.MembershipFeesComponent do
|
||||||
href={Mv.Config.vereinfacht_contact_view_url(@member.vereinfacht_contact_id)}
|
href={Mv.Config.vereinfacht_contact_view_url(@member.vereinfacht_contact_id)}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="link link-primary inline-flex items-center gap-1"
|
class="link link-accent underline inline-flex items-center gap-1"
|
||||||
>
|
>
|
||||||
{gettext("View contact in Vereinfacht")}
|
{gettext("View contact in Vereinfacht")}
|
||||||
<.icon name="hero-arrow-top-right-on-square" class="inline-block size-4" />
|
<.icon name="hero-arrow-top-right-on-square" class="inline-block size-4" />
|
||||||
|
|
@ -83,7 +83,12 @@ defmodule MvWeb.MemberLive.Show.MembershipFeesComponent do
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<%= if @vereinfacht_debug_response do %>
|
<%= if @vereinfacht_debug_response do %>
|
||||||
<div class="mt-2 rounded border border-base-300 bg-base-200 p-3 overflow-x-auto max-h-96 overflow-y-auto">
|
<div
|
||||||
|
class="mt-2 rounded border border-base-300 bg-base-200 p-3 overflow-x-auto max-h-96 overflow-y-auto"
|
||||||
|
tabindex="0"
|
||||||
|
role="region"
|
||||||
|
aria-label={gettext("Vereinfacht API response")}
|
||||||
|
>
|
||||||
<pre class="text-xs whitespace-pre-wrap font-mono"><%= format_vereinfacht_debug_response(@vereinfacht_debug_response) %></pre>
|
<pre class="text-xs whitespace-pre-wrap font-mono"><%= format_vereinfacht_debug_response(@vereinfacht_debug_response) %></pre>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
||||||
|
|
@ -2754,6 +2754,11 @@ msgstr "Für dieses Mitglied existiert kein Vereinfacht-Kontakt."
|
||||||
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
||||||
msgstr "Synchronisieren Sie dieses Mitglied unter Einstellungen (Bereich Vereinfacht) oder speichern Sie das Mitglied erneut, um den Kontakt anzulegen."
|
msgstr "Synchronisieren Sie dieses Mitglied unter Einstellungen (Bereich Vereinfacht) oder speichern Sie das Mitglied erneut, um den Kontakt anzulegen."
|
||||||
|
|
||||||
|
#: lib/mv_web/live/member_live/show/membership_fees_component.ex
|
||||||
|
#, elixir-autogen, elixir-format, fuzzy
|
||||||
|
msgid "Vereinfacht API response"
|
||||||
|
msgstr "Vereinfacht"
|
||||||
|
|
||||||
#~ # Vereinfacht API validation messages (Laravel-style, shown when creating/editing members or syncing)
|
#~ # Vereinfacht API validation messages (Laravel-style, shown when creating/editing members or syncing)
|
||||||
#~ msgid "The address field is required."
|
#~ msgid "The address field is required."
|
||||||
#~ msgstr "Das Adressfeld ist erforderlich."
|
#~ msgstr "Das Adressfeld ist erforderlich."
|
||||||
|
|
|
||||||
|
|
@ -2753,3 +2753,8 @@ msgstr ""
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lib/mv_web/live/member_live/show/membership_fees_component.ex
|
||||||
|
#, elixir-autogen, elixir-format
|
||||||
|
msgid "Vereinfacht API response"
|
||||||
|
msgstr ""
|
||||||
|
|
|
||||||
|
|
@ -2754,6 +2754,11 @@ msgstr ""
|
||||||
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
msgid "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
||||||
msgstr "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
msgstr "Sync this member from Settings (Vereinfacht section) or save the member again to create the contact."
|
||||||
|
|
||||||
|
#: lib/mv_web/live/member_live/show/membership_fees_component.ex
|
||||||
|
#, elixir-autogen, elixir-format, fuzzy
|
||||||
|
msgid "Vereinfacht API response"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#~ # Vereinfacht API validation messages (Laravel-style, shown when creating/editing members or syncing)
|
#~ # Vereinfacht API validation messages (Laravel-style, shown when creating/editing members or syncing)
|
||||||
#~ msgid "The address field is required."
|
#~ msgid "The address field is required."
|
||||||
#~ msgstr "The address field is required."
|
#~ msgstr "The address field is required."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue