From e5e5449e8b44df005b313ac9ecf08b23a8cfc260 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 19 Mar 2023 15:39:39 -0400 Subject: [PATCH] improve modal accessibility --- lib/cannery_web/components/core_components/modal.html.heex | 2 ++ priv/gettext/de/LC_MESSAGES/default.po | 6 ++++++ priv/gettext/default.pot | 6 ++++++ priv/gettext/en/LC_MESSAGES/default.po | 6 ++++++ priv/gettext/es/LC_MESSAGES/default.po | 6 ++++++ priv/gettext/fr/LC_MESSAGES/default.po | 6 ++++++ priv/gettext/ga/LC_MESSAGES/default.po | 6 ++++++ 7 files changed, 38 insertions(+) diff --git a/lib/cannery_web/components/core_components/modal.html.heex b/lib/cannery_web/components/core_components/modal.html.heex index da1090d..aec7754 100644 --- a/lib/cannery_web/components/core_components/modal.html.heex +++ b/lib/cannery_web/components/core_components/modal.html.heex @@ -6,6 +6,7 @@ p-8 flex flex-col justify-center items-center cursor-auto" style="background-color: rgba(0,0,0,0.4);" phx-remove={hide_modal()} + aria-label={gettext("Close modal")} > @@ -31,6 +32,7 @@ text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out" phx-remove={hide_modal()} + aria-label={gettext("Close modal")} > diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 357bcd1..501a7a8 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -1254,3 +1254,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr "" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index fc3f764..5d65344 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -1237,3 +1237,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 1e500bf..06227cd 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -1237,3 +1237,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index 0a38cd7..c22ab37 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -1256,3 +1256,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index d71988d..fb6aa4b 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -1257,3 +1257,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index 1740967..e6d53dc 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -1248,3 +1248,9 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Current Count" msgstr "" + +#: lib/cannery_web/components/core_components/modal.html.heex:9 +#: lib/cannery_web/components/core_components/modal.html.heex:35 +#, elixir-autogen, elixir-format +msgid "Close modal" +msgstr ""