From 13cf7dac5f8aaf5deaee5720ccd2e9a54c6326db Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:13:26 +0100 Subject: [PATCH] fix: added aria-live and aria-labels for filters in Search page (#462) * fix: added aria-live and aria-labels for filters in Search page * fix: added translations and feedback for 0 filters applied * docs: cleanup release.md * fix: changed name of variabile * fix: updated translations * fix: removed unused translation --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 6 +- locales/de/LC_MESSAGES/volto.po | 5 ++ locales/en/LC_MESSAGES/volto.po | 5 ++ locales/es/LC_MESSAGES/volto.po | 5 ++ locales/fr/LC_MESSAGES/volto.po | 5 ++ locales/it/LC_MESSAGES/volto.po | 5 ++ locales/volto.pot | 7 +- src/components/ItaliaTheme/Search/Search.jsx | 67 ++++++++++++++------ 8 files changed, 85 insertions(+), 20 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index c1378f4e3..3adfd7aac 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -43,9 +43,13 @@ ## Versione x.x.x (dd/mm/yyyy) -### Fix +### Migliorie +- Migliorata l'accessibilità nella pagina di Ricerca. - Diminuita la larghezza del testo nelle card che indicano i luoghi. + +### Fix + - Risolto un problema nel blocco Video Gallery, per cui alcuni video di youtube non erano riproducibili. ## Versione 11.1.4 (05/01/2024) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index ba6c380a2..6d3e1e8b0 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -742,6 +742,11 @@ msgstr "" msgid "actions" msgstr "" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 45ce60aaf..91e0ff8a3 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -727,6 +727,11 @@ msgstr "" msgid "actions" msgstr "View actions" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 5b76f5b95..7e8c5a4ec 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -736,6 +736,11 @@ msgstr "" msgid "actions" msgstr "Ver acciones" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index d3241018e..0dc58e335 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -744,6 +744,11 @@ msgstr "" msgid "actions" msgstr "Voir les actions" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index aa6e468c7..d8552c396 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -727,6 +727,11 @@ msgstr "Account" msgid "actions" msgstr "Vedi azioni" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/locales/volto.pot b/locales/volto.pot index 8bfba3058..9af16de4e 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-12-20T09:24:02.911Z\n" +"POT-Creation-Date: 2024-01-11T11:04:31.849Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -729,6 +729,11 @@ msgstr "" msgid "actions" msgstr "" +#: components/ItaliaTheme/Search/Search +# defaultMessage: {filterNumber} filtri attivati +msgid "active_filters" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Vai alla ricerca per sezioni avanzata msgid "advandedSectionsFilters" diff --git a/src/components/ItaliaTheme/Search/Search.jsx b/src/components/ItaliaTheme/Search/Search.jsx index 2c753585b..1b11c5f05 100644 --- a/src/components/ItaliaTheme/Search/Search.jsx +++ b/src/components/ItaliaTheme/Search/Search.jsx @@ -151,6 +151,10 @@ const messages = defineMessages({ id: 'search_skip_to_search_results', defaultMessage: 'Vai ai risultati di ricerca', }, + active_filters: { + id: 'active_filters', + defaultMessage: '{filterNumber} filtri attivati', + }, }); const searchOrderDict = { @@ -444,11 +448,21 @@ const Search = () => {
{intl.formatMessage(messages.sections)} - {activeSections > 0 && ( - - {activeSections} - - )} + + + {activeSections} +
{ >
{intl.formatMessage(messages.topics)} - {activeTopics > 0 && ( - - {activeTopics} - - )} + + + {activeTopics} +
{
{intl.formatMessage(messages.content_types)} - {activePortalTypes > 0 && ( - - {activePortalTypes} - - )} + + + {activePortalTypes} +