From 11e41fa3fe0db12eb9143507c325312c2ef9e375 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Tue, 9 Jan 2024 17:08:45 +0100 Subject: [PATCH] fix: v2 - added aria-live and aria-labels for filters in Search page --- src/components/ItaliaTheme/Search/Search.jsx | 65 ++++++++++++++------ 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/components/ItaliaTheme/Search/Search.jsx b/src/components/ItaliaTheme/Search/Search.jsx index 6c826c543..cb9eeb502 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: '{filterType} filtri attivati', + }, }); const searchOrderDict = { @@ -447,11 +451,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} +