From cc7bd97c46d6f36457123382a34ab6a04b91a28d Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Wed, 28 Feb 2024 09:24:31 +0100 Subject: [PATCH 01/10] fix: added aria label to icons across ioComune --- .../Header/HeaderSearch/HeaderSearch.jsx | 2 +- .../ItaliaTheme/Header/SocialHeader.jsx | 8 +++++++- .../ItaliaTheme/Icons/DesignIcon.jsx | 1 + .../ItaliaTheme/Icons/FontAwesomeIcon.jsx | 7 ++++--- src/components/ItaliaTheme/Icons/Icon.jsx | 16 +++++++++++++--- .../ItaliaTheme/Icons/svg/TelegramSVG.jsx | 1 + .../ItaliaTheme/Icons/svg/XTwitterSVG.jsx | 1 + .../View/Commons/Argument/ArgumentIcon.jsx | 19 +++++++++++++++++-- .../PaginaArgomentoView.jsx | 2 +- .../manage/UniversalLink/UniversalLink.jsx | 9 ++++++++- .../theme/Navigation/Navigation.jsx | 18 +++++++++++++++--- 11 files changed, 69 insertions(+), 15 deletions(-) diff --git a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx index a3a1797b2..f0ca2a403 100644 --- a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx @@ -34,7 +34,7 @@ const HeaderSearch = () => { }} href="#search" > - + { target="_blank" rel="noopener noreferrer" > - + ))} diff --git a/src/components/ItaliaTheme/Icons/DesignIcon.jsx b/src/components/ItaliaTheme/Icons/DesignIcon.jsx index e07e4f8fa..91d6b5887 100644 --- a/src/components/ItaliaTheme/Icons/DesignIcon.jsx +++ b/src/components/ItaliaTheme/Icons/DesignIcon.jsx @@ -53,6 +53,7 @@ const Icon = ({ icon, title, className, size }) => { ? `${title}${name.content}` : name.content, }} + alt={title} /> ); } diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index 70b8a39ac..bf6112f35 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -6,7 +6,7 @@ import React from 'react'; import { fontAwesomeAliases } from 'design-comuni-plone-theme/helpers/index'; const FontAwesomeIcon = (props) => { - const { className, icon, prefix, title } = props; + const { className, icon, prefix, title, socialTitle } = props; const [loadedIcon, setLoadedIcon] = React.useState({ module: null, iconName: '', @@ -35,8 +35,8 @@ const FontAwesomeIcon = (props) => { prefixKey === 'fab' ? 'brands' : prefixKey === 'far' - ? 'regular' - : 'solid', + ? 'regular' + : 'solid', iconName, ]; }; @@ -74,6 +74,7 @@ const FontAwesomeIcon = (props) => { ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + alt={socialTitle || title} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index 06939fb88..19dbcbe85 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -11,7 +11,7 @@ import XTwitterSVG from './svg/XTwitterSVG'; import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaTheme'; const Icon = (props) => { - const { icon, className, color, size, padding, ...rest } = props; + const { icon, className, color, size, padding, title, ...rest } = props; if (icon) { const classes = classNames( 'icon', @@ -35,11 +35,21 @@ const Icon = (props) => { return ; } else if (parts.length > 1) { return ( - + ); } else { return ( - + ); } } diff --git a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx index 3fd17472a..b85ad7949 100644 --- a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx @@ -10,6 +10,7 @@ const TelegramSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" + alt="Telegram" > diff --git a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx index 1d1cad9ef..fa80e83b9 100644 --- a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx @@ -10,6 +10,7 @@ const XTwitterSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" + alt="Twitter" > diff --git a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx index e90c2a21a..c26b43d90 100644 --- a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +++ b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; @@ -8,10 +9,17 @@ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; * @params {object} Dates: object. * @returns {string} Markup of the component. */ -const ArgumentIcon = ({ icon }) => { +const ArgumentIcon = ({ icon, title }) => { + const intl = useIntl(); + return icon ? (
- +
) : null; }; @@ -21,3 +29,10 @@ export default ArgumentIcon; ArgumentIcon.propTypes = { icon: PropTypes.string, }; + +const messages = defineMessages({ + iconTitle: { + id: 'icon_title', + defaultMessage: "Icona per l'argomento {argument_title}", + }, +}); diff --git a/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx b/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx index d834bb72f..ec9e3e494 100644 --- a/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx +++ b/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx @@ -87,7 +87,7 @@ const PaginaArgomentoView = ({ content }) => { > - +

{content?.title}

diff --git a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx index 1d48aa773..99d4dae2a 100644 --- a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +++ b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx @@ -22,6 +22,13 @@ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import config from '@plone/volto/registry'; +const messages = { + externalLink: { + id: 'external_link', + defaultMessage: 'Link esterno', + }, +}; + const UniversalLink = ({ href, item = null, @@ -121,7 +128,7 @@ const UniversalLink = ({ config.settings.siteProperties.markSpecialLinks && ( diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index c24a48123..61f717481 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -100,13 +100,16 @@ const Navigation = ({ pathname }) => { { setCollapseOpen(!collapseOpen); setFocusTrapActive(!focusTrapActive); }} > - + { title={intl.formatMessage(messages.CloseMenu)} onClick={() => setCollapseOpen(!collapseOpen)} > - + @@ -177,6 +185,10 @@ const messages = defineMessages({ id: 'close-menu', defaultMessage: 'Chiudi menu', }, + toggleNavigation: { + id: 'toggle-navigation', + defaultMessage: 'Apri il menu', + }, }); Navigation.propTypes = { From 6607ef9cf62de815e6827243542addd47db54ada Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Wed, 28 Feb 2024 17:03:58 +0100 Subject: [PATCH 02/10] fix: added alt text to all icons --- .../Blocks/Accordion/Block/ViewBlock.jsx | 6 ++++- .../Common/SearchFilters/DateFilter.jsx | 20 ++++++++++++++ .../Blocks/HeroImageLeft/StoresButtons.jsx | 4 +-- .../Blocks/Listing/RibbonCardTemplate.jsx | 14 ++++++++-- .../SimpleCard/SimpleCardTemplateCompact.jsx | 16 ++++++++++- .../Blocks/Listing/SliderTemplate.jsx | 27 ++++++++++++++++--- .../ItaliaTheme/Blocks/NumbersBlock/View.jsx | 12 ++++++--- .../Blocks/SearchSections/Body.jsx | 7 ++++- .../ItaliaTheme/Blocks/VideoGallery/Body.jsx | 7 ++++- .../ItaliaTheme/Cards/CardCategory.jsx | 13 ++++++++- .../ItaliaTheme/Footer/FooterNavigation.jsx | 1 + .../ItaliaTheme/Footer/FooterSocials.jsx | 1 + .../Header/HeaderSearch/HeaderSearch.jsx | 5 +++- .../ItaliaTheme/Header/SocialHeader.jsx | 2 +- .../ItaliaTheme/Icons/DesignIcon.jsx | 4 +-- .../ItaliaTheme/Icons/FontAwesomeIcon.jsx | 1 - src/components/ItaliaTheme/Icons/Icon.jsx | 7 ++--- .../ItaliaTheme/Icons/SectionIcon.jsx | 4 +-- .../ItaliaTheme/Pagination/PaginationItem.jsx | 2 ++ .../ItaliaTheme/View/Commons/HelpBox.jsx | 9 +++++++ .../ItaliaTheme/View/Commons/LocationItem.jsx | 11 +++++++- .../ItaliaTheme/View/Commons/OfficeCard.jsx | 16 ++++++++++- .../View/Commons/SearchSectionForm.jsx | 7 ++++- .../EventoContattiOrganizzatoreEsterno.jsx | 14 +++++++++- src/components/SelectInput/SelectInput.jsx | 17 ++++++++++-- .../volto-form-block/components/Field.jsx | 20 ++++++++++++++ .../Search/components/DateRangeFacet.jsx | 5 ++++ .../manage/UniversalLink/UniversalLink.jsx | 3 ++- .../theme/Navigation/Navigation.jsx | 2 +- 29 files changed, 223 insertions(+), 34 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx index 44b7a7b28..28217487f 100644 --- a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx @@ -40,6 +40,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { color="primary" icon={isOpen ? 'it-minus' : 'it-plus'} padding={false} + altText="toggle" /> {redraft( @@ -69,7 +70,10 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
{data.linkMoreTitle || intl.formatMessage(messages.vedi)} - +
)} diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx index 58989fe1d..b90e069bc 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import { useIntl, defineMessages } from 'react-intl'; +import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; @@ -174,6 +175,7 @@ const getDateRangePickerPhrases = (intl) => { ), }; }; + const DateFilter = (props) => { const intl = useIntl(); const [focusedDateInput, setFocusedDateInput] = useState(null); @@ -190,6 +192,22 @@ const DateFilter = (props) => { } = props; const { DateRangePicker } = reactDates; + const customArrowIcon = (props) => { + return ( + + ); + }; + + const customCloseIcon = (props) => { + return ( + + ); + }; + let isMobile = false; if (__CLIENT__) isMobile = window && window.innerWidth < 992; @@ -251,6 +269,8 @@ const DateFilter = (props) => { hideKeyboardShortcutsPanel={true} showClearDates phrases={getDateRangePickerPhrases(intl)} + customArrowIcon={customArrowIcon()} + customCloseIcon={customCloseIcon()} /> ); diff --git a/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx b/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx index b687319aa..e4c7432de 100644 --- a/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx +++ b/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx @@ -23,14 +23,14 @@ const StoresButtons = ({ data }) => { {data.playStoreLink && ( )} {data.appStoreLink && ( )} diff --git a/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx index 76338420a..31e18e52f 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx @@ -35,6 +35,10 @@ const messages = defineMessages({ id: 'Vedi', defaultMessage: 'Vedi', }, + argumentIcon: { + id: 'argument_icon', + defaultMessage: 'Icona {type}', + }, }); const RibbonCardTemplate = (props) => { @@ -96,7 +100,6 @@ const RibbonCardTemplate = (props) => { name: 'BlockExtraTags', dependencies: ['RibbonCardTemplate', item['@type']], }).component; - return ( { {(category || icon) && (
- {icon && } + {icon && ( + + )} {category && {category}}
)} diff --git a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx index 032958dd1..c9f0ddb23 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { UniversalLink } from '@plone/volto/components'; @@ -10,6 +11,13 @@ import { ListingLinkMore, } from 'design-comuni-plone-theme/components/ItaliaTheme'; +const messages = defineMessages({ + argumentIcon: { + id: 'argument_icon', + defaultMessage: 'Icona {type}', + }, +}); + const SimpleCardTemplateCompact = ({ items, isEditMode, @@ -23,6 +31,7 @@ const SimpleCardTemplateCompact = ({ titleLine, linkmore_id_lighthouse, }) => { + const intl = useIntl(); return (
{title && ( @@ -49,7 +58,12 @@ const SimpleCardTemplateCompact = ({ > {show_icon && (
- +
)} diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index badf03459..dd78c3855 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -81,7 +81,11 @@ function NextArrow(props) { onKeyDown={handleKeyboardUsers} id="sliderNextArrow" > - + {intl.formatMessage(messages.successivo)} @@ -126,7 +130,11 @@ function PrevArrow(props) { id="sliderPrevArrow" onKeyDown={handleKeyboardUsers} > - + {intl.formatMessage(messages.precedente)} @@ -185,11 +193,21 @@ const Slide = ({ > {full_width ? ( - {item.title} + {item.title}{' '} + ) : ( <> - {item.title} + {item.title}{' '} + )} @@ -342,6 +360,7 @@ const SliderTemplate = ({ {userAutoplay ? 'pause' : 'play'} diff --git a/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx b/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx index 9808b9d72..a9a07a2cc 100644 --- a/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +++ b/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx @@ -50,9 +50,15 @@ const NumbersView = ({ data, block }) => {
{(data.icon1 || data.icon2 || data.icon3) && (
- {data.icon1?.length > 0 && } - {data.icon2?.length > 0 && } - {data.icon3?.length > 0 && } + {data.icon1?.length > 0 && ( + + )} + {data.icon2?.length > 0 && ( + + )} + {data.icon3?.length > 0 && ( + + )}
)} diff --git a/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx b/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx index 1909ef393..2d1187528 100644 --- a/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx @@ -61,7 +61,12 @@ const Body = ({ block, sections }) => { onClick={(e) => navigate(inputText, searchFilters())} aria-label={intl.formatMessage(messages.doSearch)} > - + { {data?.title &&

{data.title}

} {(data?.channel_link || data?.channel_link_title) && (
- + {data.channel_link ? ( { const { iconName, date, href, children, ...rest } = props; + const intl = useIntl(); const classes = classNames({ 'category-top': date || ' ', 'categoryicon-top': iconName, @@ -29,7 +38,9 @@ const CardCategory = (props) => { const categoryText = !href && children && ( {children} ); - const categoryIcon = iconName && ; + const categoryIcon = iconName && ( + + ); return (
diff --git a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx index f34eb012d..7c93a7a5b 100644 --- a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +++ b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx @@ -52,6 +52,7 @@ const FooterNavigation = () => { { className="align-top" padding={false} size="sm" + altText={social.title} /> {social.title} diff --git a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx index f0ca2a403..75b817e4e 100644 --- a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx @@ -34,7 +34,10 @@ const HeaderSearch = () => { }} href="#search" > - +
{ icon={social.icon} padding={false} size="" - title={social.title} + altText={social.title} /> diff --git a/src/components/ItaliaTheme/Icons/DesignIcon.jsx b/src/components/ItaliaTheme/Icons/DesignIcon.jsx index 91d6b5887..2b188890c 100644 --- a/src/components/ItaliaTheme/Icons/DesignIcon.jsx +++ b/src/components/ItaliaTheme/Icons/DesignIcon.jsx @@ -16,7 +16,7 @@ const defaultProps = { padding: false, }; -const Icon = ({ icon, title, className, size }) => { +const Icon = ({ icon, title, className, size, altText }) => { const ImportedIconRef = useRef(null); const [loading, setLoading] = useState(false); @@ -53,7 +53,7 @@ const Icon = ({ icon, title, className, size }) => { ? `${title}${name.content}` : name.content, }} - alt={title} + alt={altText} /> ); } diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index bf6112f35..38b27baa1 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -12,7 +12,6 @@ const FontAwesomeIcon = (props) => { iconName: '', family: 'solid', }); - const getIconAlias = (icon, aliasList) => { if (icon in aliasList) { return aliasList[icon]; diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index 19dbcbe85..aebddbb44 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -11,7 +11,8 @@ import XTwitterSVG from './svg/XTwitterSVG'; import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaTheme'; const Icon = (props) => { - const { icon, className, color, size, padding, title, ...rest } = props; + const { icon, className, color, size, padding, title, altText, ...rest } = + props; if (icon) { const classes = classNames( 'icon', @@ -38,7 +39,7 @@ const Icon = (props) => { ); @@ -47,7 +48,7 @@ const Icon = (props) => { ); diff --git a/src/components/ItaliaTheme/Icons/SectionIcon.jsx b/src/components/ItaliaTheme/Icons/SectionIcon.jsx index d2fbc9a82..453fbcadc 100644 --- a/src/components/ItaliaTheme/Icons/SectionIcon.jsx +++ b/src/components/ItaliaTheme/Icons/SectionIcon.jsx @@ -12,14 +12,14 @@ const section_icons = { novita: 'it-calendar', 'documenti-e-dati': 'it-file', }; -const SectionIcon = ({ section, iconProps }) => { +const SectionIcon = ({ section, iconProps, title }) => { const section_name = section.startsWith('/') ? section.substring(1, section.length) : section; const icon = section_icons[section_name]; - return icon ? : null; + return icon ? : null; }; export default SectionIcon; diff --git a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx index de8182097..e91d0b832 100644 --- a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +++ b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx @@ -79,6 +79,7 @@ class PaginationItem extends Component { icon="it-chevron-left" style={{ ariaHidden: true }} color="primary" + altText="prevItem" /> @@ -92,6 +93,7 @@ class PaginationItem extends Component { icon="it-chevron-right" style={{ ariaHidden: true }} color="primary" + altText="nextItem" /> {intl.formatMessage(messages.nextPage)} diff --git a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx index 688fe4b41..72f7fd2d9 100644 --- a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +++ b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx @@ -1,10 +1,12 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Callout, CalloutTitle } from 'design-react-kit'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { RichText } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const HelpBox = ({ text }) => { + const intl = useIntl(); return text ? ( @@ -14,6 +16,7 @@ const HelpBox = ({ text }) => { padding={false} size="" aria-hidden + altText={intl.formatMessage(messages.ulteriori_info)} /> @@ -28,4 +31,10 @@ HelpBox.propTypes = { text: PropTypes.object.isRequired, }; +const messages = defineMessages({ + ulteriori_info: { + id: 'ulteriori_info', + defaultMessage: 'Icona ulteriori informazioni', + }, +}); export default HelpBox; diff --git a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx index 6c6192bd3..3b3d1f70f 100644 --- a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +++ b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx @@ -27,6 +27,10 @@ const messages = defineMessages({ id: 'circoscrizione', defaultMessage: 'Circoscrizione', }, + icona_luoghi: { + id: 'icona_luoghi', + defaultMessage: 'Icona luoghi', + }, }); const LocationItem = ({ @@ -45,7 +49,12 @@ const LocationItem = ({ return location ? (
- {show_icon && } + {show_icon && ( + + )}
{(location.nome_sede || location.title) && ( diff --git a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx index 743018192..4b32e0c7f 100644 --- a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +++ b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx @@ -1,3 +1,4 @@ +import { useIntl, defineMessages } from 'react-intl'; import { UniversalLink } from '@plone/volto/components'; import PropTypes from 'prop-types'; import cx from 'classnames'; @@ -22,6 +23,7 @@ const OfficeCard = ({ no_details = false, ...rest }) => { + const intl = useIntl(); const Image = config.getComponent({ name: 'Image' }).component; const image = showimage && Image({ item: office, sizes: '80px', loading: 'lazy' }); @@ -37,7 +39,12 @@ const OfficeCard = ({ )} {...rest} > - {icon && } + {icon && ( + + )}
{ id="search-page-button" className="pe-2 py-0 rounded-0" > - +
diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx index 32a9872e7..e441462a1 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx @@ -1,3 +1,4 @@ +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Card, CardBody } from 'design-react-kit'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; @@ -8,6 +9,7 @@ import { } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const EventoContattiOrganizzatoreEsterno = ({ content }) => { + const intl = useIntl(); return richTextHasContent(content?.organizzato_da_esterno) || content?.telefono || content?.email || @@ -18,7 +20,10 @@ const EventoContattiOrganizzatoreEsterno = ({ content }) => { noWrapper={true} tag="div" > - + @@ -52,4 +57,11 @@ EventoContattiOrganizzatoreEsterno.propTypes = { content: PropTypes.object.isRequired, }; +const messages = defineMessages({ + icona_telefono: { + id: 'icona_telefono', + defaultMessage: 'Icona telefono', + }, +}); + export default EventoContattiOrganizzatoreEsterno; diff --git a/src/components/SelectInput/SelectInput.jsx b/src/components/SelectInput/SelectInput.jsx index 7e0e37ec9..f900c1a9d 100644 --- a/src/components/SelectInput/SelectInput.jsx +++ b/src/components/SelectInput/SelectInput.jsx @@ -88,6 +88,10 @@ const messages = defineMessages({ id: 'ay11_select cancel', defaultMessage: 'Annulla', }, + dropwdown_indicator: { + id: 'dropdown_indicator', + defaultMessage: 'Apri il menu', + }, }); const SelectContainer = injectLazyLibs('reactSelect')(({ @@ -131,10 +135,15 @@ MenuList.propTypes = { }; const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { + const intl = useIntl(); const components = props.reactSelect.components; return ( - + ); }); @@ -165,7 +174,11 @@ const ClearIndicator = (props) => { style={{ padding: '0px 5px' }} title={intl.formatMessage(messages.ay11_for_cancel)} > - +
); diff --git a/src/customizations/volto-form-block/components/Field.jsx b/src/customizations/volto-form-block/components/Field.jsx index 0c2dd7e23..61ec0ccd4 100644 --- a/src/customizations/volto-form-block/components/Field.jsx +++ b/src/customizations/volto-form-block/components/Field.jsx @@ -10,6 +10,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useIntl, defineMessages } from 'react-intl'; import { Input, FormGroup, Label } from 'design-react-kit'; +import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import FileWidget from 'design-comuni-plone-theme/components/ItaliaTheme/manage/Widgets/FileWidget'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; @@ -22,6 +23,24 @@ const messages = defineMessages({ id: 'form_select_a_value', defaultMessage: 'Seleziona un valore', }, + open_menu: { + id: 'open_menu', + defaultMessage: 'Apri il menu', + }, +}); + +const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { + const intl = useIntl(); + const components = props.reactSelect.components; + return ( + + + + ); }); /** @@ -104,6 +123,7 @@ const Field = ({ { color="primary" icon="it-youtube" className="me-2" - altText="YouTube" + title="YouTube" /> {data.channel_link ? ( { {children} ); const categoryIcon = iconName && ( - + ); return ( diff --git a/src/components/ItaliaTheme/Footer/FooterSocials.jsx b/src/components/ItaliaTheme/Footer/FooterSocials.jsx index 8daf1fd61..28016efa0 100644 --- a/src/components/ItaliaTheme/Footer/FooterSocials.jsx +++ b/src/components/ItaliaTheme/Footer/FooterSocials.jsx @@ -41,7 +41,7 @@ const FooterSocials = () => { className="align-top" padding={false} size="sm" - altText={social.title} + title={social.title} /> {social.title} diff --git a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx index 75b817e4e..f0ca2a403 100644 --- a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx @@ -34,10 +34,7 @@ const HeaderSearch = () => { }} href="#search" > - +
{ icon={social.icon} padding={false} size="" - altText={social.title} + title={social.title} /> diff --git a/src/components/ItaliaTheme/Icons/DesignIcon.jsx b/src/components/ItaliaTheme/Icons/DesignIcon.jsx index 2b188890c..5c51b1332 100644 --- a/src/components/ItaliaTheme/Icons/DesignIcon.jsx +++ b/src/components/ItaliaTheme/Icons/DesignIcon.jsx @@ -1,4 +1,5 @@ -import React, { useState, useEffect, useRef } from 'react'; +import React, { useState, useEffect, useRef, useMemo } from 'react'; +import { v4 as uuid } from 'uuid'; import PropTypes from 'prop-types'; const propTypes = { @@ -16,9 +17,10 @@ const defaultProps = { padding: false, }; -const Icon = ({ icon, title, className, size, altText }) => { +const Icon = ({ icon, title, className, size }) => { const ImportedIconRef = useRef(null); const [loading, setLoading] = useState(false); + const iconID = useMemo(() => uuid(), []); useEffect(() => { setLoading(true); @@ -50,10 +52,10 @@ const Icon = ({ icon, title, className, size, altText }) => { aria-hidden="true" dangerouslySetInnerHTML={{ __html: title - ? `${title}${name.content}` + ? `${title}${name.content}` : name.content, }} - alt={altText} + aria-labelledby={iconID} /> ); } diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index 38b27baa1..4f660b9f2 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -2,11 +2,13 @@ * Icon component. * @module components/ItaliaTheme/Icons/SectionIcon */ -import React from 'react'; +import React, { useMemo } from 'react'; +import { v4 as uuid } from 'uuid'; import { fontAwesomeAliases } from 'design-comuni-plone-theme/helpers/index'; const FontAwesomeIcon = (props) => { - const { className, icon, prefix, title, socialTitle } = props; + const { className, icon, prefix, title } = props; + const iconID = useMemo(() => uuid(), []); const [loadedIcon, setLoadedIcon] = React.useState({ module: null, iconName: '', @@ -70,10 +72,10 @@ const FontAwesomeIcon = (props) => { className={`icon fa-icon ${className ?? ''}`} dangerouslySetInnerHTML={{ __html: title - ? `${title}${loadedIcon.module.content}` + ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} - alt={socialTitle || title} + aria-labelledby={iconID} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index aebddbb44..843f83505 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -11,8 +11,7 @@ import XTwitterSVG from './svg/XTwitterSVG'; import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaTheme'; const Icon = (props) => { - const { icon, className, color, size, padding, title, altText, ...rest } = - props; + const { icon, className, color, size, padding, title, ...rest } = props; if (icon) { const classes = classNames( 'icon', @@ -39,7 +38,7 @@ const Icon = (props) => { ); @@ -48,7 +47,7 @@ const Icon = (props) => { ); diff --git a/src/components/ItaliaTheme/Icons/SectionIcon.jsx b/src/components/ItaliaTheme/Icons/SectionIcon.jsx index 453fbcadc..9386fd0bb 100644 --- a/src/components/ItaliaTheme/Icons/SectionIcon.jsx +++ b/src/components/ItaliaTheme/Icons/SectionIcon.jsx @@ -19,7 +19,7 @@ const SectionIcon = ({ section, iconProps, title }) => { const icon = section_icons[section_name]; - return icon ? : null; + return icon ? : null; }; export default SectionIcon; diff --git a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx index b85ad7949..f5350920a 100644 --- a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx @@ -10,7 +10,7 @@ const TelegramSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" - alt="Telegram" + aria-label="Telegram" > diff --git a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx index fa80e83b9..52d381c43 100644 --- a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx @@ -10,7 +10,7 @@ const XTwitterSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" - alt="Twitter" + aria-label="Twitter" > diff --git a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx index e91d0b832..719b43837 100644 --- a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +++ b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx @@ -79,7 +79,7 @@ class PaginationItem extends Component { icon="it-chevron-left" style={{ ariaHidden: true }} color="primary" - altText="prevItem" + title="prevItem" /> @@ -93,7 +93,7 @@ class PaginationItem extends Component { icon="it-chevron-right" style={{ ariaHidden: true }} color="primary" - altText="nextItem" + title="nextItem" /> {intl.formatMessage(messages.nextPage)} diff --git a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx index 1a0db1971..c43b85213 100644 --- a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +++ b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx @@ -131,7 +131,6 @@ const UniversalLink = ({ title={title} size="xs" className="ms-1 align-sub external-link" - altText={title || intl.formatMessage(messages.externalLink)} /> )} From c902d61a14302af771761818673b245ef7926d84 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Thu, 7 Mar 2024 15:22:51 +0100 Subject: [PATCH 04/10] chore: removed unused code --- .../components/manage/UniversalLink/UniversalLink.jsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx index c43b85213..1d48aa773 100644 --- a/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +++ b/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx @@ -22,13 +22,6 @@ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import config from '@plone/volto/registry'; -const messages = { - externalLink: { - id: 'external_link', - defaultMessage: 'Link esterno', - }, -}; - const UniversalLink = ({ href, item = null, From e4e7c17611d42c1b33bcdbb02f7845f535d09592 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Thu, 7 Mar 2024 15:25:18 +0100 Subject: [PATCH 05/10] fix: added translations --- locales/de/LC_MESSAGES/volto.po | 46 +++++++++++++++++++++++++++++++ locales/en/LC_MESSAGES/volto.po | 46 +++++++++++++++++++++++++++++++ locales/es/LC_MESSAGES/volto.po | 46 +++++++++++++++++++++++++++++++ locales/fr/LC_MESSAGES/volto.po | 46 +++++++++++++++++++++++++++++++ locales/it/LC_MESSAGES/volto.po | 46 +++++++++++++++++++++++++++++++ locales/volto.pot | 48 ++++++++++++++++++++++++++++++++- 6 files changed, 277 insertions(+), 1 deletion(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 11169f419..6edf7c0bf 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -834,6 +834,12 @@ msgstr "" msgid "argoment" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1151,6 +1157,11 @@ msgstr "" msgid "casi_particolari" msgstr "" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1473,6 +1484,11 @@ msgstr "" msgid "dateRangePicker_closeDatePicker" msgstr "" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1750,6 +1766,11 @@ msgstr "" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2208,6 +2229,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3934,6 +3975,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index d7e1395e1..51b377dbf 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -819,6 +819,12 @@ msgstr "Responsible area" msgid "argoment" msgstr "Topic" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1136,6 +1142,11 @@ msgstr "Downloadable formats" msgid "casi_particolari" msgstr "Special cases" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1458,6 +1469,11 @@ msgstr "Clear dates" msgid "dateRangePicker_closeDatePicker" msgstr "Close datepicker" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1735,6 +1751,11 @@ msgstr "Download" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2193,6 +2214,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3919,6 +3960,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Responsible office" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index aeeadfd4a..7d2fabcc1 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -828,6 +828,12 @@ msgstr "Área responsable" msgid "argoment" msgstr "Tema" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1145,6 +1151,11 @@ msgstr "Formatos descargables" msgid "casi_particolari" msgstr "Casos especiales" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1467,6 +1478,11 @@ msgstr "Borrar fechas" msgid "dateRangePicker_closeDatePicker" msgstr "Cerrar selector de fecha" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1744,6 +1760,11 @@ msgstr "Descargar" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2202,6 +2223,26 @@ msgstr "Icono" msgid "iconDescription" msgstr "Puede seleccionar un icono de los propuestos en el menú desplegable o puede escribir/pegar el nombre de un icono 'fontawesome 5' en el campo de texto" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3928,6 +3969,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Oficina responsable" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 742faab64..39653a214 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -836,6 +836,12 @@ msgstr "Zone responsable" msgid "argoment" msgstr "Sujet" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1153,6 +1159,11 @@ msgstr "Formats téléchargeables" msgid "casi_particolari" msgstr "Cas spéciaux" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1475,6 +1486,11 @@ msgstr "Effacer les dates" msgid "dateRangePicker_closeDatePicker" msgstr "Fermer le sélecteur de date" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1752,6 +1768,11 @@ msgstr "Télécharger" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2210,6 +2231,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3936,6 +3977,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Bureau responsable" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 66b703041..6f5c661af 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -819,6 +819,12 @@ msgstr "Area responsabile" msgid "argoment" msgstr "Argomento" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1136,6 +1142,11 @@ msgstr "Formati scaricabili" msgid "casi_particolari" msgstr "Casi particolari" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1458,6 +1469,11 @@ msgstr "Cancella le date" msgid "dateRangePicker_closeDatePicker" msgstr "Chiudi" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1735,6 +1751,11 @@ msgstr "Scarica" msgid "downloadPlayVideo" msgstr "Scarica e riproduci video" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2193,6 +2214,26 @@ msgstr "Icona" msgid "iconDescription" msgstr "Puoi selezionare un’icona fra quelle proposte nel menu a tendina oppure puoi scrivere/incollare nel campo di testo il nome di un’icona di fontawesome 6" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3919,6 +3960,11 @@ msgstr "Unità organizzativa" msgid "ufficio_responsabile" msgstr "Ufficio responsabile" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/volto.pot b/locales/volto.pot index 66dd1eaaa..cff9f01b5 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-02-19T11:08:36.048Z\n" +"POT-Creation-Date: 2024-03-07T14:23:55.309Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -821,6 +821,12 @@ msgstr "" msgid "argoment" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1138,6 +1144,11 @@ msgstr "" msgid "casi_particolari" msgstr "" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1460,6 +1471,11 @@ msgstr "" msgid "dateRangePicker_closeDatePicker" msgstr "" +#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter +# defaultMessage: Intervallo date +msgid "dateRangePicker_dateInterval" +msgstr "" + #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -1737,6 +1753,11 @@ msgstr "" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2195,6 +2216,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {argument_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -3921,6 +3962,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView From a16dd05e4299e3576552fe8192874e6ddebe0e14 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Tue, 26 Mar 2024 10:36:39 +0100 Subject: [PATCH 06/10] fix: used previously created translation messages --- .../Blocks/Common/SearchFilters/DateFilter.jsx | 6 +----- .../Blocks/Listing/SliderTemplate.jsx | 18 +++++++++++++----- .../ItaliaTheme/Pagination/PaginationItem.jsx | 4 ++-- .../Search/components/DateRangeFacet.jsx | 9 ++++++--- .../components/theme/Navigation/Navigation.jsx | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx index 75317299c..fe1caac38 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx @@ -33,10 +33,6 @@ const messages = defineMessages({ defaultMessage: 'Interagisci con il calendario e seleziona le date di inizio e/o fine', }, - dateInterval: { - id: 'dateRangePicker_dateInterval', - defaultMessage: 'Intervallo date', - }, clearDate: { id: 'dateRangePicker_clearDate', defaultMessage: 'Cancella la data', @@ -201,7 +197,7 @@ const DateFilter = (props) => { ); }; diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index 968386821..a85ca5464 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -50,6 +50,10 @@ const messages = defineMessages({ id: 'slideDot', defaultMessage: 'Vai alla slide {index}', }, + openLink: { + id: 'openLink', + defaultMessage: 'Apri il link', + }, }); function NextArrow(props) { @@ -81,7 +85,11 @@ function NextArrow(props) { onKeyDown={handleKeyboardUsers} id="sliderNextArrow" > - + {intl.formatMessage(messages.successivo)} @@ -129,7 +137,7 @@ function PrevArrow(props) { {intl.formatMessage(messages.precedente)} @@ -193,7 +201,7 @@ const Slide = ({ ) : ( @@ -202,7 +210,7 @@ const Slide = ({ )} @@ -356,7 +364,7 @@ const SliderTemplate = ({ {userAutoplay ? 'pause' : 'play'} diff --git a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx index 719b43837..b389586c8 100644 --- a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +++ b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx @@ -79,7 +79,7 @@ class PaginationItem extends Component { icon="it-chevron-left" style={{ ariaHidden: true }} color="primary" - title="prevItem" + title={intl.formatMessage(messages.prevPage)} /> @@ -93,7 +93,7 @@ class PaginationItem extends Component { icon="it-chevron-right" style={{ ariaHidden: true }} color="primary" - title="nextItem" + title={intl.formatMessage(messages.nextPage)} /> {intl.formatMessage(messages.nextPage)} diff --git a/src/customizations/volto/components/manage/Blocks/Search/components/DateRangeFacet.jsx b/src/customizations/volto/components/manage/Blocks/Search/components/DateRangeFacet.jsx index a9dc409c6..b94c6481e 100644 --- a/src/customizations/volto/components/manage/Blocks/Search/components/DateRangeFacet.jsx +++ b/src/customizations/volto/components/manage/Blocks/Search/components/DateRangeFacet.jsx @@ -3,7 +3,7 @@ - Use with more plone.app.querystring.date operations */ import React, { useState } from 'react'; -import { Icon } from 'design-react-kit'; +import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { defineMessages, injectIntl } from 'react-intl'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; import { compose } from 'redux'; @@ -58,7 +58,10 @@ const NextIcon = () => ( ); const customArrowIcon = (props) => { - return ; + const { intl } = props; + return ( + + ); }; const CloseIcon = () => ; @@ -99,7 +102,7 @@ const DateRangeFacet = (props) => { isOutsideRange={() => false} navPrev={} navNext={} - customArrowIcon={customArrowIcon()} + customArrowIcon={customArrowIcon(props)} />
diff --git a/src/customizations/volto/components/theme/Navigation/Navigation.jsx b/src/customizations/volto/components/theme/Navigation/Navigation.jsx index 49a490ad6..61f717481 100644 --- a/src/customizations/volto/components/theme/Navigation/Navigation.jsx +++ b/src/customizations/volto/components/theme/Navigation/Navigation.jsx @@ -108,7 +108,7 @@ const Navigation = ({ pathname }) => { > Date: Tue, 26 Mar 2024 11:13:13 +0100 Subject: [PATCH 07/10] fix: added translations --- locales/de/LC_MESSAGES/volto.po | 10 +++++----- locales/en/LC_MESSAGES/volto.po | 10 +++++----- locales/es/LC_MESSAGES/volto.po | 10 +++++----- locales/fr/LC_MESSAGES/volto.po | 10 +++++----- locales/it/LC_MESSAGES/volto.po | 10 +++++----- locales/volto.pot | 12 ++++++------ 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 6edf7c0bf..e59fe61db 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1484,11 +1484,6 @@ msgstr "" msgid "dateRangePicker_closeDatePicker" msgstr "" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2625,6 +2620,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 51b377dbf..a2f86d8e1 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -1469,11 +1469,6 @@ msgstr "Clear dates" msgid "dateRangePicker_closeDatePicker" msgstr "Close datepicker" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2610,6 +2605,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Press release number" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 7d2fabcc1..3ea7c410d 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1478,11 +1478,6 @@ msgstr "Borrar fechas" msgid "dateRangePicker_closeDatePicker" msgstr "Cerrar selector de fecha" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2619,6 +2614,11 @@ msgstr "Bloque de números" msgid "numero_progressivo_cs" msgstr "Número de comunicado de prensa" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 39653a214..fc9658341 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1486,11 +1486,6 @@ msgstr "Effacer les dates" msgid "dateRangePicker_closeDatePicker" msgstr "Fermer le sélecteur de date" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2627,6 +2622,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Numéro du communiqué de presse" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 6f5c661af..1cce72a34 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1469,11 +1469,6 @@ msgstr "Cancella le date" msgid "dateRangePicker_closeDatePicker" msgstr "Chiudi" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2610,6 +2605,11 @@ msgstr "Blocco numeri" msgid "numero_progressivo_cs" msgstr "Numero del comunicato stampa" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" diff --git a/locales/volto.pot b/locales/volto.pot index cff9f01b5..d8ede7669 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-03-07T14:23:55.309Z\n" +"POT-Creation-Date: 2024-03-26T09:41:28.601Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1471,11 +1471,6 @@ msgstr "" msgid "dateRangePicker_closeDatePicker" msgstr "" -#: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter -# defaultMessage: Intervallo date -msgid "dateRangePicker_dateInterval" -msgstr "" - #: components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter # defaultMessage: Tasto invio msgid "dateRangePicker_enterKey" @@ -2612,6 +2607,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" From 90d41f2e28df45b5a187e7b049414242014276fb Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Wed, 27 Mar 2024 16:28:53 +0100 Subject: [PATCH 08/10] fix: title attributes in all icons --- locales/de/LC_MESSAGES/volto.po | 12 ++++++- locales/en/LC_MESSAGES/volto.po | 30 ++++++++++------ locales/es/LC_MESSAGES/volto.po | 12 ++++++- locales/fr/LC_MESSAGES/volto.po | 12 ++++++- locales/it/LC_MESSAGES/volto.po | 12 ++++++- locales/volto.pot | 16 +++++++-- .../Blocks/Accordion/Block/ViewBlock.jsx | 14 +++++++- .../Common/SearchFilters/DateFilter.jsx | 36 ++++++++----------- .../Blocks/Listing/SliderTemplate.jsx | 6 +++- .../ItaliaTheme/Footer/FooterNavigation.jsx | 8 +++-- .../ItaliaTheme/Icons/FontAwesomeIcon.jsx | 1 + src/components/ItaliaTheme/Icons/Icon.jsx | 16 ++------- .../ItaliaTheme/Icons/SectionIcon.jsx | 4 +-- .../View/Commons/Argument/ArgumentIcon.jsx | 4 +-- .../ItaliaTheme/View/Commons/HelpBox.jsx | 2 +- .../ItaliaTheme/View/Commons/LocationItem.jsx | 2 +- .../ItaliaTheme/View/Commons/OfficeCard.jsx | 2 +- .../View/Commons/SearchSectionForm.jsx | 2 +- .../EventoContattiOrganizzatoreEsterno.jsx | 2 +- src/components/SelectInput/SelectInput.jsx | 4 +-- .../volto-form-block/components/Field.jsx | 2 +- 21 files changed, 131 insertions(+), 68 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 553272b06..0c946ffd1 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1225,6 +1225,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -2245,7 +2250,7 @@ msgid "iconDescription" msgstr "" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" msgstr "" @@ -2645,6 +2650,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 6ec6cf9e0..f2583b5bd 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -828,7 +828,7 @@ msgstr "Topic" #: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact # defaultMessage: Icona {type} msgid "argument_icon" -msgstr "" +msgstr "{type} Icon" #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza @@ -1150,7 +1150,7 @@ msgstr "Special cases" #: components/ItaliaTheme/Cards/CardCategory # defaultMessage: Icona categoria msgid "category_icon" -msgstr "" +msgstr "Category icon" #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale @@ -1210,6 +1210,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "Close the accordion" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1754,7 +1759,7 @@ msgstr "" #: components/SelectInput/SelectInput # defaultMessage: Apri il menu msgid "dropdown_indicator" -msgstr "" +msgstr "Open the menu" #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes @@ -2230,24 +2235,24 @@ msgid "iconDescription" msgstr "" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" -msgstr "" +msgstr "Icon for {topic_title} topic" #: components/ItaliaTheme/View/Commons/LocationItem # defaultMessage: Icona luoghi msgid "icona_luoghi" -msgstr "" +msgstr "Venues icon" #: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno # defaultMessage: Icona telefono msgid "icona_telefono" -msgstr "" +msgstr "Phone icon" #: components/ItaliaTheme/View/Commons/OfficeCard # defaultMessage: Icona ufficio msgid "icona_ufficio" -msgstr "" +msgstr "Office icon" #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone @@ -2630,10 +2635,15 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Press release number" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "Open the accordion" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" -msgstr "" +msgstr "Open link" #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda @@ -3998,7 +4008,7 @@ msgstr "Responsible office" #: components/ItaliaTheme/View/Commons/HelpBox # defaultMessage: Icona ulteriori informazioni msgid "ulteriori_info" -msgstr "" +msgstr "Further information icon" #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index ae8ab1c7c..1efaa0e62 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1219,6 +1219,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -2239,7 +2244,7 @@ msgid "iconDescription" msgstr "Puede seleccionar un icono de los propuestos en el menú desplegable o puede escribir/pegar el nombre de un icono 'fontawesome 5' en el campo de texto" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" msgstr "" @@ -2639,6 +2644,11 @@ msgstr "Bloque de números" msgid "numero_progressivo_cs" msgstr "Número de comunicado de prensa" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index fff6d8e73..03f111f26 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1227,6 +1227,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -2247,7 +2252,7 @@ msgid "iconDescription" msgstr "" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" msgstr "" @@ -2647,6 +2652,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Numéro du communiqué de presse" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index f7725de98..c1060e88e 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1210,6 +1210,11 @@ msgstr "Rimuovi ricerca testuale" msgid "close-menu" msgstr "Chiudi menu" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -2230,7 +2235,7 @@ msgid "iconDescription" msgstr "Puoi selezionare un’icona fra quelle proposte nel menu a tendina oppure puoi scrivere/incollare nel campo di testo il nome di un’icona di fontawesome 6" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" msgstr "" @@ -2630,6 +2635,11 @@ msgstr "Blocco numeri" msgid "numero_progressivo_cs" msgstr "Numero del comunicato stampa" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" diff --git a/locales/volto.pot b/locales/volto.pot index d61d81e59..973581dbf 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-03-26T09:41:28.601Z\n" +"POT-Creation-Date: 2024-03-27T14:59:28.025Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1212,6 +1212,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -2232,7 +2237,7 @@ msgid "iconDescription" msgstr "" #: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon -# defaultMessage: Icona per l'argomento {argument_title} +# defaultMessage: Icona per l'argomento {topic_title} msgid "icon_title" msgstr "" @@ -2632,6 +2637,11 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + #: components/ItaliaTheme/Blocks/Listing/SliderTemplate # defaultMessage: Apri il link msgid "openLink" @@ -3314,7 +3324,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" diff --git a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx index 084c6f64f..7c43c54b6 100644 --- a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx @@ -17,6 +17,14 @@ const messages = defineMessages({ id: 'Vedi', defaultMessage: 'Vedi', }, + closeAccordion: { + id: 'closeAccordion', + defaultMessage: "Chiudi l'accordion", + }, + openAccordion: { + id: 'openAccordion', + defaultMessage: "Apri l'accordion", + }, }); /** @@ -40,7 +48,11 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { color="primary" icon={isOpen ? 'it-minus' : 'it-plus'} padding={false} - title="toggle" + title={ + isOpen + ? intl.formatMessage(messages.closeAccordion) + : intl.formatMessage(messages.openAccordion) + } /> {redraft( diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx index fe1caac38..d93d7ebd8 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx @@ -192,26 +192,6 @@ const DateFilter = (props) => { } = props; const { DateRangePicker } = reactDates; - const customArrowIcon = (props) => { - return ( - - ); - }; - - const customCloseIcon = (props) => { - return ( - - ); - }; - let isMobile = false; if (__CLIENT__) isMobile = window && window.innerWidth < 992; @@ -273,8 +253,20 @@ const DateFilter = (props) => { hideKeyboardShortcutsPanel={true} showClearDates phrases={getDateRangePickerPhrases(intl)} - customArrowIcon={customArrowIcon()} - customCloseIcon={customCloseIcon()} + customArrowIcon={ + + } + customCloseIcon={ + + } />
); diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index a85ca5464..832006211 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -364,7 +364,11 @@ const SliderTemplate = ({ {userAutoplay ? 'pause' : 'play'} diff --git a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx index 7c93a7a5b..8e45c5241 100644 --- a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +++ b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx @@ -51,8 +51,12 @@ const FooterNavigation = () => {

{ ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + aria-labelledby={iconID} aria-hidden={props['aria-hidden']} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index 843f83505..06939fb88 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -11,7 +11,7 @@ import XTwitterSVG from './svg/XTwitterSVG'; import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaTheme'; const Icon = (props) => { - const { icon, className, color, size, padding, title, ...rest } = props; + const { icon, className, color, size, padding, ...rest } = props; if (icon) { const classes = classNames( 'icon', @@ -35,21 +35,11 @@ const Icon = (props) => { return ; } else if (parts.length > 1) { return ( - + ); } else { return ( - + ); } } diff --git a/src/components/ItaliaTheme/Icons/SectionIcon.jsx b/src/components/ItaliaTheme/Icons/SectionIcon.jsx index 9386fd0bb..d2fbc9a82 100644 --- a/src/components/ItaliaTheme/Icons/SectionIcon.jsx +++ b/src/components/ItaliaTheme/Icons/SectionIcon.jsx @@ -12,14 +12,14 @@ const section_icons = { novita: 'it-calendar', 'documenti-e-dati': 'it-file', }; -const SectionIcon = ({ section, iconProps, title }) => { +const SectionIcon = ({ section, iconProps }) => { const section_name = section.startsWith('/') ? section.substring(1, section.length) : section; const icon = section_icons[section_name]; - return icon ? : null; + return icon ? : null; }; export default SectionIcon; diff --git a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx index c26b43d90..69870950f 100644 --- a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +++ b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx @@ -17,7 +17,7 @@ const ArgumentIcon = ({ icon, title }) => { @@ -33,6 +33,6 @@ ArgumentIcon.propTypes = { const messages = defineMessages({ iconTitle: { id: 'icon_title', - defaultMessage: "Icona per l'argomento {argument_title}", + defaultMessage: "Icona per l'argomento {topic_title}", }, }); diff --git a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx index 72f7fd2d9..7636343ae 100644 --- a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +++ b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx @@ -16,7 +16,7 @@ const HelpBox = ({ text }) => { padding={false} size="" aria-hidden - altText={intl.formatMessage(messages.ulteriori_info)} + title={intl.formatMessage(messages.ulteriori_info)} /> diff --git a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx index 3b3d1f70f..c383ecb42 100644 --- a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +++ b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx @@ -52,7 +52,7 @@ const LocationItem = ({ {show_icon && ( )}
diff --git a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx index 0bf48a2c5..b67c5d20c 100644 --- a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +++ b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx @@ -41,7 +41,7 @@ const OfficeCard = ({ {icon && ( )}
diff --git a/src/components/ItaliaTheme/View/Commons/SearchSectionForm.jsx b/src/components/ItaliaTheme/View/Commons/SearchSectionForm.jsx index d7fec94be..9854c6696 100644 --- a/src/components/ItaliaTheme/View/Commons/SearchSectionForm.jsx +++ b/src/components/ItaliaTheme/View/Commons/SearchSectionForm.jsx @@ -103,7 +103,7 @@ const SearchSectionForm = ({ content }) => { icon="it-search" aria-hidden={true} size="sm" - altText={intl.formatMessage(messages.search)} + title={intl.formatMessage(messages.search)} />
diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx index e441462a1..85ff6ea56 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx @@ -22,7 +22,7 @@ const EventoContattiOrganizzatoreEsterno = ({ content }) => { > diff --git a/src/components/SelectInput/SelectInput.jsx b/src/components/SelectInput/SelectInput.jsx index f900c1a9d..1902478b2 100644 --- a/src/components/SelectInput/SelectInput.jsx +++ b/src/components/SelectInput/SelectInput.jsx @@ -142,7 +142,7 @@ const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { ); @@ -177,7 +177,7 @@ const ClearIndicator = (props) => {
diff --git a/src/customizations/volto-form-block/components/Field.jsx b/src/customizations/volto-form-block/components/Field.jsx index 10e52fa02..1052b5813 100644 --- a/src/customizations/volto-form-block/components/Field.jsx +++ b/src/customizations/volto-form-block/components/Field.jsx @@ -37,7 +37,7 @@ const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { ); From edb62430bb2ef52d664865d5a31597b2e2152888 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Wed, 27 Mar 2024 16:33:15 +0100 Subject: [PATCH 09/10] fix: removed aria-labelledby from FontAwesomeIcon --- src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index 6fd082386..f95a64baf 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -75,7 +75,6 @@ const FontAwesomeIcon = (props) => { ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} - aria-labelledby={iconID} aria-hidden={props['aria-hidden']} /> ) : icon ? ( From 97a3ed655d258a2e1b5be30fc42a3895c9a64cd6 Mon Sep 17 00:00:00 2001 From: Sabrina Bongiovanni Date: Wed, 27 Mar 2024 16:34:35 +0100 Subject: [PATCH 10/10] fix: added aria-labelledby to FontAwesomeIcon --- src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index f95a64baf..6fd082386 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -75,6 +75,7 @@ const FontAwesomeIcon = (props) => { ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + aria-labelledby={iconID} aria-hidden={props['aria-hidden']} /> ) : icon ? (