From ca4bf05c7c2e6ef8cb759232aa732bb7bb1248fe Mon Sep 17 00:00:00 2001 From: Krister Haverinen Date: Wed, 12 Jul 2023 14:11:44 +0300 Subject: [PATCH 1/3] Fix label field precise --- .../helfi_news_archive/js/src/components/form/Dropdown.tsx | 6 +++++- public/modules/custom/helfi_news_archive/translations/fi.po | 4 ++++ public/modules/custom/helfi_news_archive/translations/sv.po | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/public/modules/custom/helfi_news_archive/js/src/components/form/Dropdown.tsx b/public/modules/custom/helfi_news_archive/js/src/components/form/Dropdown.tsx index 0d12dc146..f7320c5ea 100644 --- a/public/modules/custom/helfi_news_archive/js/src/components/form/Dropdown.tsx +++ b/public/modules/custom/helfi_news_archive/js/src/components/form/Dropdown.tsx @@ -35,7 +35,11 @@ export const Dropdown = ({ placeholder, searchState, setQuery, - clearButtonAriaLabel = Drupal.t('Clear selection', {}, { context: 'News archive clear button aria label' }), + clearButtonAriaLabel = Drupal.t( + 'Clear @label selection', + { '@label': label }, + { context: 'News archive clear selection label' } + ), selectedItemRemoveButtonAriaLabel = Drupal.t('Remove item', {}, { context: 'News archive remove item aria label' }), toggleButtonAriaLabel = Drupal.t('Open the combobox', {}, { context: 'News archive open dropdown aria label' }), }: DropdownProps) => { diff --git a/public/modules/custom/helfi_news_archive/translations/fi.po b/public/modules/custom/helfi_news_archive/translations/fi.po index c599f7784..f27d224c6 100644 --- a/public/modules/custom/helfi_news_archive/translations/fi.po +++ b/public/modules/custom/helfi_news_archive/translations/fi.po @@ -49,6 +49,10 @@ msgctxt "News archive clear selections" msgid "Clear selections" msgstr "Tyhjennä valinnat" +msgctxt "News archive clear selection label" +msgid "Clear @label selection" +msgstr "Tyhjennä @label valinnat" + msgctxt "News archive no results" msgid "No results found" msgstr "Ei tuloksia" diff --git a/public/modules/custom/helfi_news_archive/translations/sv.po b/public/modules/custom/helfi_news_archive/translations/sv.po index 9a135fcf5..0768df09a 100644 --- a/public/modules/custom/helfi_news_archive/translations/sv.po +++ b/public/modules/custom/helfi_news_archive/translations/sv.po @@ -17,6 +17,10 @@ msgctxt "News archive clear button aria label" msgid "Clear selection" msgstr "Rensa alla" +msgctxt "News archive clear selection label" +msgid "Clear @label selection" +msgstr "Rensa alla @label" + msgctxt "News archive remove item aria label" msgid "Remove item" msgstr "Töm valda" From d319630f54fb8e4dcf8eb20ef0b8cb52008c71f0 Mon Sep 17 00:00:00 2001 From: Krister Haverinen Date: Wed, 12 Jul 2023 15:23:38 +0300 Subject: [PATCH 2/3] Fixed aria-hidden --- .../js/src/containers/SelectionsContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/modules/custom/helfi_news_archive/js/src/containers/SelectionsContainer.tsx b/public/modules/custom/helfi_news_archive/js/src/containers/SelectionsContainer.tsx index 93914ffcd..ccb93be8f 100644 --- a/public/modules/custom/helfi_news_archive/js/src/containers/SelectionsContainer.tsx +++ b/public/modules/custom/helfi_news_archive/js/src/containers/SelectionsContainer.tsx @@ -54,7 +54,7 @@ const SelectionsContainer = ({ clearSelection, searchState, setSearchState }: Se {filters}